Fork me on GitHub

Hi, given some entity-id and current db is there a way to check if this entity is in "retracted (via :db/retractEntity) state"? Or should I just check if this entity has no attributes - hence was retracted?


Entities only exist implicitly, insofar as there are datoms talking about them. If you are interested in controlling an entities visibility to users, you could model that explicitly as an :entity/visible? attribute. If you check whether an entity exists in the current snapshot, you cannot distinguish between entities that were retracted and entities that never existed in the first place.