say I'm trying to transact a tree of comments. I have {:id 1, :content: "...", :comments [{:id 2, :content "..."}, ...]}
I've done the work of denormalizing this into a flat vector of comments. how do I ensure that the :comments
reference is maintained?
I tried transacting like [{:id 1, :content "...", :comments [:id 2]}]
but that throws an error, "Nothing found for entity ID [:id 2]"
am I supposed to assign each comment a unique negative :db/id
and use that as the ref lookup?
aha, I do not need to denormalize it at all 😂 transacting a nested map just works
:thumbsup: So much fun working with this Datascript thing