Cascade persist not working for replasinc child entity #8665
Unanswered
bogdan-dubyk
asked this question in
Support Questions
Replies: 2 comments
-
I hadn't read the post before making my own, but I think I have the same concern. read here. Is it you're wrong or is it a bug? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is standard PHP behavior related to the typed property An option would be to create a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two entities
Product
andPrint
with one to one relation, whereProduct
is a parent entity andPrint
is a child, but "owning side" is aPrint
(in database print table 'll have a product_id and foreign key)Product:
and
Print
:when I'm inserting new product all is fine
it's inserting product and related print, generating new id for a print
But now when I want to update prodcut:
I'm getting error
Cannot assign null to property App\\Entity\\Print::$id of type int
, why cascade persist not automatically persistPrint
???Beta Was this translation helpful? Give feedback.
All reactions