With empty component, one can create a reference to non-existing entity
Open
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 5.8k
- Forks
- 318
- PR merge metrics
- No merged PRs in 30d
Description
(-> (d/empty-db {:comp {:db/valueType :db.type/ref,
:db/isComponent true}})
(d/with [{:comp {}}])
:tx-data)
; => [#datascript/Datom [1 :comp 2 536870913 true]]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the example through d/empty-db and d/with and inspect how the :db.type/ref and :db/isComponent schema are handled during that transaction. Done means the empty component no longer produces a reference datom for a non-existing entity, with regression coverage added for this example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100