This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Next thing, still trying to make a mental map of IDs in Asami. Always worried I’m asking too dumb questions, so please tell me to go read whatever or something if that’s the case 🙂 My testcase:
(def test-data-9 [{:db/ident :id/a-100 :name "my name" :type "something"}
{:db/ident :id/a-101 :name "second name" :type "something" :likes :id/a-100}])
(def transact-info @(d/transact conn {:tx-data test-data-9}))
(p/clear)
(tap> (d/export-data conn))
(d/q '[:find ?node101 ?node100 ?name :where [?node101 :likes ?node100] [?node101 :name ?name] ] conn)
And my question - why do I get the node ID and why do I get the :id
? I would naively assume it would pick the same attribute. 🙂
Well, it looks like the value in :likes :id/a-100
ins not interpreted as an ID referring to another entity but just as a keyword. I think you would need either {:db/ident :id/a-100}
or [:db/ident :id/a-100]
, do not remember now.
from https://github.com/quoll/asami/commit/810051fab0096446795768101235f69d469212db#diff-4bc930aab03b842a5c535a4f1f14a65860446c4f77447d92d2e32422561f968aR228 it seems it needs to be [:db/ident :id/a-100]