Skip to content
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

Entity instance is not correctly initialized inside .save() method #10849

Open
Enrico724 opened this issue Apr 23, 2024 · 0 comments
Open

Entity instance is not correctly initialized inside .save() method #10849

Enrico724 opened this issue Apr 23, 2024 · 0 comments

Comments

@Enrico724
Copy link

          I just found this issue because I thought one of my repositories returned plain objects, where all the others usually returned class instances on `save()`. Turns out that in all other places I indeed called `create()` before `save()`. It looks like `save` returns an entity instance when it was given an entity instance, and a plain object when it's given a plain object.

Originally posted by @quezak in #4363 (comment)

@Enrico724 Enrico724 changed the title I just found this issue because I thought one of my repositories returned plain objects, where all the others usually returned class instances on save(). Turns out that in all other places I indeed called create() before save(). It looks like save returns an entity instance when it was given an entity instance, and a plain object when it's given a plain object. Entity instance is not correctly initialized inside .save() method Apr 23, 2024
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

1 participant