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
Great plugin! Loving it. This not an issue, unless it's not possible, in which case it's a feature request. Had a quick question about updating embedded arrays...
Say you've got a standard User model, and the following:
I tried that first before I entered the issue (should’ve mentioned it). Unfortunately it doesn’t work, unless I’m missing a key part of the process.
If I just add “ pos : 'votes.$.user’ “ then actually it doesn’t bring any of the user fields.
If I add “ user : {} “ or “ user : mongoose.Schema.Types.Mixed “ to the VoteSchema, then when I save the user _id, it is saved, but none of the user fields are synced...
Perhaps I’m doing something wrong?
Thanks for your help.
On May 29, 2014 at 5:15:50 PM, PG Herveou ([email protected]) wrote:
Did you try this?
VoteSchema.plugin(filler, {
ref : 'User',
dest : 'Claim',
pos : 'votes.$.user',
select : 'firstName lastName'
});
—
Reply to this email directly or view it on GitHub.
Great plugin! Loving it. This not an issue, unless it's not possible, in which case it's a feature request. Had a quick question about updating embedded arrays...
Say you've got a standard User model, and the following:
This works wonderfully (thanks again!), but it returns the user fields at the same level of 'vote'. So you get this...
Is it possible to make it sync the user fields behind a 'user' key, like this:
Thanks for your help.
The text was updated successfully, but these errors were encountered: