PrePersist Event is fired with an Invalid entity #5175

Closed
opened 2026-01-22 15:00:41 +01:00 by admin · 1 comment
Owner

Originally created by @moroine on GitHub (Jul 5, 2016).

Originally assigned to: @Ocramius on GitHub.

Hi,

I'm writing an issue as my PR from 22th December (https://github.com/doctrine/doctrine2/pull/5570).

The PRE_PERSIST event is fired when persisting a new entity. As merging a new entity come down to persisting it, when expect the same behavior on both operations.

The fact is when using merge instead of persist, the uow fire the PRE_PERSIST event with an empty entity instead of the entity as it will be persist.

I really think my PR is ready to merge with unit test who check two line changes. If anyone could take a look on it, it would be great !

Thank You.

Originally created by @moroine on GitHub (Jul 5, 2016). Originally assigned to: @Ocramius on GitHub. Hi, I'm writing an issue as my PR from 22th December (https://github.com/doctrine/doctrine2/pull/5570). The **PRE_PERSIST** event is fired when persisting a new entity. As merging a new entity come down to persisting it, when expect the same behavior on both operations. The fact is when using merge instead of persist, the **uow** fire the **PRE_PERSIST** event with an empty entity instead of the entity as it will be persist. I really think my PR is ready to merge with unit test who check two line changes. If anyone could take a look on it, it would be great ! Thank You.
admin added the Duplicate label 2026-01-22 15:00:41 +01:00
admin closed this issue 2026-01-22 15:00:41 +01:00
Author
Owner

@Ocramius commented on GitHub (Jul 5, 2016):

There are loads of PRs that need attention. I realize that it is frustrating to not have feedback on them, but opening new issues only increases the noise. I added the milestone to it, and it will be merged before releasing.

@Ocramius commented on GitHub (Jul 5, 2016): There are loads of PRs that need attention. I realize that it is frustrating to not have feedback on them, but opening new issues only increases the noise. I added the milestone to it, and it will be merged before releasing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5175