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
cool. Just a point of clarification. If I have a V
shaped relationship like this:
A B
\ /
C
And I retract the entity A
using :db/retractEntity
, assuming A
and B
both have references to C
, will B
s 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.
Thanks!
It’s just a shorthand for retracting all facts involving that entity.