Jira issue originally created by user drauschenbach:
Steps to reproduce:
- Load an entity from an EntityManager (one with a generator=AUTO primary key)
- perform $em->remove(entity);
- Create a new entity to re-create it, using identical attributes (except for PK): $em->persist(new entity);
- flush()
Expected result:
A DELETE followed by an INSERT
Actual result:
An INSERT with a new assigned primary key, but a failure on some other unique index