Pulling `:db/id` for a missing id gives different results than Datomic
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 5.8k
- Forks
- 318
- PR merge metrics
- No merged PRs in 30d
Description
In Datomic, if you pull :db/id for any eid x that doesn't exist, you get {:db/id x}. In DataScript, you get nil.
Further, (pull-many [:some/attr] missing-eids) evaluates to [] in DataScript, but (repeat (count missing-ids) nil) in Datomic (and of course, returns a vector of {:db/id x} when :db/id is pulled).
This bears some relation to #166.
Is this behavior you'd consider modifying to match that of Datomic?
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 reported differences in pull and pull-many for missing entity IDs, using the Datomic behavior described in the issue as the reference. The work is done when missing IDs preserve the expected result shape and :db/id values match that behavior, with coverage for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100