You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok so I've figured out that you need to use dot notation to force nested props, and I've written a random-length loop in my lib to populate arrays, but it's still not picking up arrays WITHIN objects no matter which syntax I try it with. Minimal fail case follows:
constoptions={
...
'relationships.parent': '<parent_id>',// this one works'relationships.children': ['<child_id>','<child_id>',],// OR'relationships.children.0': '<child_id>','relationships.children.1': '<child_id>',// OR'relationships.children[0]': '<child_id>','relationships.children[1]': '<child_id>',}
In both cases above (as well as passing in the fully-structured relationships object), running dummy(Model, options) causes the children to get populated with random strings, not the specific ID strings I'm trying to set them to. All the other fields I'm trying to use this on, including inside top-level arrays, are populated correctly.
The text was updated successfully, but these errors were encountered:
Ok so I've figured out that you need to use dot notation to force nested props, and I've written a random-length loop in my lib to populate arrays, but it's still not picking up arrays WITHIN objects no matter which syntax I try it with. Minimal fail case follows:
In both cases above (as well as passing in the fully-structured relationships object), running
dummy(Model, options)
causes the children to get populated with random strings, not the specific ID strings I'm trying to set them to. All the other fields I'm trying to use this on, including inside top-level arrays, are populated correctly.The text was updated successfully, but these errors were encountered: