DDC-1612: Cannot call entityManager->flush($entity) with new entity #2024

Closed
opened 2026-01-22 13:37:50 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 19, 2012).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user prolic:

Following works:
$entity = $em->find('Entity', 1);
$entity->setName('newName');
$em->persist($entity);
$em->flush($entity);

Following does NOT work:
$entity = new Entity();
$entity->setName('newName');
$em->persist($entity);
$em->flush($entity);

Originally created by @doctrinebot on GitHub (Jan 19, 2012). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user prolic: Following works: $entity = $em->find('Entity', 1); $entity->setName('newName'); $em->persist($entity); $em->flush($entity); Following does NOT work: $entity = new Entity(); $entity->setName('newName'); $em->persist($entity); $em->flush($entity);
admin added the Bug label 2026-01-22 13:37:50 +01:00
admin closed this issue 2026-01-22 13:37:51 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jan 21, 2012):

Comment created by @beberlei:

Fixed

@doctrinebot commented on GitHub (Jan 21, 2012): Comment created by @beberlei: Fixed
Author
Owner

@doctrinebot commented on GitHub (Jan 21, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jan 21, 2012): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2024