Skip to content

Entity changed via preserialize and wrongly persisted #509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
edrush opened this issue Oct 19, 2015 · 1 comment
Closed

Entity changed via preserialize and wrongly persisted #509

edrush opened this issue Oct 19, 2015 · 1 comment

Comments

@edrush
Copy link

edrush commented Oct 19, 2015

Hi,

in my entity class I have a @Preserialize function, which modifies some properties before serialization. My serialization is done within an command. This command is scheduled and therefore stored in the database. After running the commands I update their "last run on" property. So at the end I call $em->flush.
Here comes the strange behaviour: my serialized entities get persisted with the modified properties. But I never called a persist() on them, they are not be updated at all, only serialized.

Did I misunderstand something?

Best regards,
Wolfram

@goetas
Copy link
Collaborator

goetas commented Apr 24, 2017

Closing, Sorry for the long feedback loop. This issue is probably a problem of your application (calling somewhere persist, or you have cascade=persist|all somewhere.

Looks to be a doctrine issue anyway

@goetas goetas closed this as completed Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants