Jira issue originally created by user @beberlei:
UnitOfWork::getEntityState checks for the state by using the id as one indicator. This can be created using a pre-insert generator though, which means the entity does not have to exist at all, even though an id was already generated.
Comment created by @beberlei:
Issue was closed with resolution "Fixed"