Ask questions on the official Q&A site at https://ask.datomic.com!
mafcocinco 2020-08-08T04:58:14.135600Z

Random newb question: If an entity is retracted, are all references to that entity automatically retracted as well or are those retractions explicitly required?


> It retracts all the attribute values where the given id is either the entity or value, effectively retracting the entity’s own data and any references to the entity as well. https://docs.datomic.com/on-prem/transactions.html#dbfn-retractentity

mafcocinco 2020-08-10T02:33:19.150100Z

cool. Just a point of clarification. If I have a V shaped relationship like this:

A    B
 \  /
And I retract the entity A using :db/retractEntity, assuming A and B both have references to C, will Bs reference to C be removed as part of the recursive retraction? The path of least surprise would tell me yes but I just wanted to confirm.


You can try it 🙂


But yes. Facts B and C will also be retracted.

mafcocinco 2020-08-10T12:50:06.152Z



It’s just a shorthand for retracting all facts involving that entity.