datascript icon indicating copy to clipboard operation
datascript copied to clipboard

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

Open tonsky opened this issue 5 years ago • 0 comments

(-> (d/empty-db {:comp {:db/valueType :db.type/ref,
                        :db/isComponent true}})
  (d/with [{:comp {}}])
  :tx-data)

; => [#datascript/Datom [1 :comp 2 536870913 true]]

tonsky avatar Jul 09 '20 23:07 tonsky