-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Ensure "cascade" mapping is set for ResolveTargetDocumentListener #888
Conversation
Few tests are failing now and are relevant to your PR |
Tnx, my bad, was too fast to create PR, fix it soon |
Still having 1 error (looks like unrelared):
Any idea how to fix? |
Btw, this error appears on |
fyi @jmikola |
Blocked by #890 |
due 'cascade' was not accessible in ResolveTargetDocumentListener while remapping and resolved target document does not inherit original cascade rules.
@jmikola, done |
I realize this makes the ODM handling in line with ORM (see: here), but can you elaborate on the bug that this fixes? From the test changes, it looks like the referenced document associations never received cascade info. |
$mapping['isCascadeRefresh'] = in_array('refresh', $cascades); | ||
$mapping['isCascadeMerge'] = in_array('merge', $cascades); | ||
$mapping['isCascadeDetach'] = in_array('detach', $cascades); | ||
$mapping['isCascadeCallbacks'] = in_array('callbacks', $cascades); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than expectations in tests, I don't see isCascadeCallbacks
used anywhere in ODM. ORM has no such cascade, either. @jwage: is this obsolete and a candidate for removal?
@jmikola, yes similar processing as ORM has, but I'm afraid that didn't get you correctly what u want me to do. check for valid enum? In general, internal logic is based on Property |
@jaymecd: You last comment explained it. It wasn't clear to me from the original PR message what the change accomplished, but I see what you're referring to about the |
Merged in a6bd9a8 with some amending to the commit message. |
Welcome and thank you too. |
... due 'cascade' was not accessible in ResolveTargetDocumentListener while remapping and resolved target document does not inherit original cascade rules.