Closed thetutlage closed 9 years ago
Hi @thetutlage, are you still experiencing this issue? From looking at the code, are you sure success
is an object with id
?
For future reference, this sort of question will get more visibility and quicker response on the waterline main repo. This repo is meant for docs only.
Great i will keep that in mind and yes success has a key called id with valid type of object
This certainly may be a bug. I think you'll have more luck if you pass a no-op to save
, i.e.,
if(success){
group.users.add(success.id);
group.save(function(){});
}
Alternately, do any of your models have an empty/misdefined beforeUpdate
lifecycle callback?
I have 2 models Groups and Users as below :-
Groups.js
Users
Inside my User controller , i want to associate the user i am going to create with an existing group
And it is returning