-
Notifications
You must be signed in to change notification settings - Fork 933
Test for Merging a bidirectional list creates unnecessary UPDATE statement #1531
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
Test for Merging a bidirectional list creates unnecessary UPDATE statement #1531
Conversation
* collection owns FK (inverse=false) * Removing OrderIndex on child * Set update/insert=false on child's parent mapping * Set parent's list's key/parent to update=false
Could get my tests green without any code changes, just changed the mapping. However - it was far from obvious how to get this right... Still think "normal" biref should work. Anyhow, to make this use case work, I had to change the mapping as follows...
Don't know if...
|
Well it works if I have understood all this well, but in a sub-optimal manner.
Why not, doc sources are in doc\reference\modules, if you see a proper way of documenting this.
Ideally it should work in an optimal way (a single insert rather than insert then update), but if this implies too complicated code for achieving a single insert, I will not consider it is worth it. Especially since mapping with a |
Not sure what to do with this tests :( |
Just delete them in their present form. |
Thinking about it again, should a list mapped as inverse even be considered a "normal" thing? Handling indexes looks more as the responsibility of the list. At least, the list is always concerned by the indexes, while children may ignore them completely. |
Sorry, didn't mean it was a "normal thing to do", but rather "the normal way of mapping a biref collection is using inverse=true". |
Mark the failing case as known bug To be squashed
Closing this PR should be done if #1530 is closed too without being done. I do not think it should be closed. So I have updated this PR for including again the failing case, along with the mapping not having the issue. The failing case is marked as known bug for allowing merging this. I have also moved the files to a folder named |
Test for #1530.