Skip to content

DDC-847: EntityManager flush performs insert before remove #5368

@doctrinebot

Description

@doctrinebot

Jira issue originally created by user drauschenbach:

Steps to reproduce:

  1. Load an entity from an EntityManager (one with a generator=AUTO primary key)
  2. perform $em->remove(entity);
  3. Create a new entity to re-create it, using identical attributes (except for PK): $em->persist(new entity);
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions