Fork me on GitHub
#datomic
<
2019-02-18
>
Twice13:02:53

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?

ncg13:02:42

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.