Fork me on GitHub

Having a hard time with the built-in database function db.fn/cas when trying to set a ref many field. Is it possible to perform a compare and set for a REF MANY field. If so, any help would be appreciated. As a sidenote, I am trying to transact in Clojure.


@darrellesh: As far as I know, :db.fn/cas does not work for any cardinality many attribute types or even for cardinality one refs if the ids passed are idents or lookup refs. In my experience it's only really good for cardinality one non-ref attributes.


@domkm: Yeah. That is what I was seeing in my repl tests. Is there any documentation around this function as to how it should be used. The Datomic transaction function docs do not mention any limitations. Thanks in advance...


@darrellesh: I'm not familiar with official docs on it's limitations. I recall seeing some unofficial statements in the Datomic Google Group but I wouldn't be able to point you to the exact post.


@domkm: Good to know. Not what I was hoping for - but thanks for your help. There should be some Docs on this! But, then again we are not talking about SQL databases.


@domkm: Wow! that is exactly what we are looking for at first glance.