Jira issue originally created by user stof:
The UnitOfWork never sets the state to STATEREMOVED in the map when scheduling an entity for delete. This means that the UnitOfWork will never tell you that the entity is in STATE_REMOVED when asking for its state but will return STATEMANAGED
Comment created by @beberlei:
Issue was closed with resolution "Fixed"