-
Notifications
You must be signed in to change notification settings - Fork 356
Nested structure not persistable that goes beyond a first level of a parent child relationship #1771
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
Comments
Could you clarify what "cannot save children" means? Doesn't the data get saved? Or is it a problem with loading it again? Do you get an exception? This might be a duplicate of #1692 but with the current description it is impossible to tell. I need either confirmation that this is a duplicate of the issue mentioned above or a reproducer. |
Cannot save children means that he expects a foreign key to type A and because of that it throws an error. You have to use the foreign key for type B in type C and not for type A. Do you have any test cases for a nested structure until level 2 or above? |
Nothing in Spring Data JDBC checks the existence of a foreign key. Could you please at least post the full stack trace? |
I'm interpreting your comment here #1692 (comment) as this being another duplicate of #1692 |
Hey,
I thought I did something wrong first, but I noticed that you cannot save children that depend on the children of a aggregate parent.
Scenario:
you have a type A that is an aggregate that you want to save. Type A has children of type B and Type B has children of type C.
It's possible to save type A with children of type B but children of type C are not saved because data-jdbc expact type C to have a foreign key to type A and IMO that is nonsense.
The text was updated successfully, but these errors were encountered: