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
//search for one to one
for(var rel in self.$hasOne) {
if(rel === name) {
self[rel] = new self.$mapping[rel];
var id = self[self.$hasOne[rel].id]; //mandatory
var field = self.$hasOne[rel].field || null;
return self[rel].$get(id,field);
}
}
In the following code I believe self.$hasMany should be self.$hasOne
Also, I am getting the following error when trying to use this code:
TypeError: Cannot read property 'apply' of undefined
line of code that throws the error is:
My User model:
My Profile model:
The text was updated successfully, but these errors were encountered: