Skip to content

Replacement for Postgres SERIAL (deprecation of IDENTITY) #10781

Closed Answered by greg0ire
aleho asked this question in Support Questions
Discussion options

You must be logged in to vote

Is there a reliable way to find out whether an entity has been "written" to the DB on Postgres?

I'm assuming you mean this only for new entities.
I might be wrong, but isn't that what $entityManager->getUnitOfWork()->isScheduleForInsert($entity) would do?

Is EntityManager::contains() even supposed to work?
On MariaDB/MySQL EntityManager::contains($e) returns false unless the entity has been flushed.

I find this kind of hard to believe. Can you write a test case reproducing the issue?

Replies: 2 comments 7 replies

This comment was marked as off-topic.

@aleho
Comment options

@greg0ire
Comment options

@aleho
Comment options

@greg0ire
Comment options

Comment options

You must be logged in to vote
3 replies
@aleho
Comment options

@greg0ire
Comment options

@aleho
Comment options

Answer selected by aleho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants