-
Notifications
You must be signed in to change notification settings - Fork 417
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
Fix for issue #677: Set the back reference #678
Conversation
Provided tests for testing if all references are set for crossreferences before saving
…nged when calling hashCode provided test for the hasCode() function
looks good to me. @staabm? |
@danez did the tests fail without the patch, otherwise LGTM. You should always create the test first. This eases handling on our side and also makes sure that the fix works correctly. |
Okay sorry, next time i commit the tests separately first.
|
I changed the order of the parameters so in the test the actual and expected values are correct. |
Fix for issue #677: Set the back reference
thanks! |
@danez no problem, just a hint to make things better next time. thanks for your contribution! |
When calling add...() on an BaseObject to add a crossreference, the generated code now sets the backreference on the Object that is given to the add function.
This ensures that all references are already set when the object is still not saved.
On the other hand I add a clone in the hasCode function to ensure that the the hasCode function never ever changes the original request as it is not necessary.