SOLVED
The situation is that I have two tables, the table User that CloudBoost gives you, and the table Movie that I made up. User contains a list called movies for the relation, being a relation many to many.
What I want to make is to add a new movie to the list of movies that the user already have. That's what I thought it should work:
var user = CB.CloudUser.current;
var movies = user.get("movies");
movies.push(movie);
user.set('movies', movies);
user.save({
success : function(user){
//do things
}, error : function(err){
//do things
}
});
However, it cannot make the user.save
, it bumps an error.
How could I made this? Thanks.