Closed den1k closed 1 year ago
(require '[datalevin.core :as d]) (def test-conn (d/create-conn nil {:id {:db/unique :db.unique/identity :db/valueType :db.type/string}})) (d/transact! test-conn [{:id "ent-a"}]) ;=> {:datoms-transacted 1} (d/transact! test-conn [{:id "ent-b" :some-edn {:entity (d/entity @test-conn [:id "ent-a"])}}]) ;=> {:datoms-transacted 2} (d/transact! test-conn [{:id "ent-b" :some-edn :replace}]) ; => ;Execution error (NullPointerException) at datalevin.entity/ent->map (entity.cljc:315). ;Cannot read field "store" because "db" is null
The issue seems to be on thawing when map->ent returns nil here https://github.com/juji-io/datalevin/blob/master/src/datalevin/entity.cljc#L328
map->ent