Cannot Reproduce
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
UnassignedUnassignedReporter
Samuel W. KnowltonSamuel W. KnowltonPriority
Major
Details
Details
Assignee
Unassigned
UnassignedReporter
Samuel W. Knowlton
Samuel W. KnowltonPriority
Sentry
Sentry
Sentry
Created April 3, 2023 at 3:08 PM
Updated September 25, 2023 at 8:13 PM
Resolved September 18, 2023 at 1:02 PM
Use case: We have Quick
user
object; users havefamilyMembersChildren
(hasManyThrough → Child) and familyMembers havemostRecentRegistrations
(hasOne).If I get a
user
and a mementify it to ask forfamilyMembersChildren
it works as expected with an array of children attached to each user.If I ask for
familyMembersChildren
andfamilyMembersChildren.mostRecentRegistration
– then I get themostRecentRegistration
record in place of the child record, e.g. instead ofI get
Our investigation suggests that
getMemento(includes=["foo", "foo.bar"], ignoreDefaults=true)
means "recursively mementify foo, but, because nested child includes have been mentioned, recursively apply ignore defaults"modules/mementifier/interceptors/Mementifier.cfc:357Because
ignoredefaults=true
with an includes list of["bar"]
means "mementify this thing exactly just with bar"`In other words: mementifier doesn’t like it if you ask for [root.thing] as well as [root.thing.childThing]
Tested this on Mementifier v2 and v3 (current). Quick is v4 but I don’t think this has anything to do with Quick exactly.