hyperfiddle-2020 icon indicating copy to clipboard operation
hyperfiddle-2020 copied to clipboard

Datomic lookup refs not mappable to :tempids lookup map when :db/id not pulled

Open dustingetz opened this issue 6 years ago • 1 comments

This stage

[[:db/add "tempid-17592186047481-:link/fiddle-[:fiddle/ident :seattle/districts]" :fiddle/ident :a/yo]
 [:db/add 17592186047481 :link/fiddle "tempid-17592186047481-:link/fiddle-[:fiddle/ident :seattle/districts]"]]

In conjunction with this query (note #_ :db/id)

[:find [(pull ?link [#_:db/id :fiddle/ident]) ...]
 :where 
[?link :fiddle/ident]]

Hyperfiddle will infer the best identity, and there isn't one, because the lookup ref is not good yet. But how can Hyperfiddle know that it isn't good yet without having pulled the :db/id necessary to inspect the tempid map?

dustingetz avatar Feb 06 '19 21:02 dustingetz

https://forum.datomic.com/t/lookup-ref-upsert/826

dustingetz avatar Feb 06 '19 21:02 dustingetz