Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

With empty component, one can create a reference to non-existing entity

Open
#357 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
clojure
Domain
database

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.

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]]
Dominant language
Clojure
Stars
5.8k
Forks
318
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tonsky/datascript

All issues in tonsky/datascript

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.