I've questions about working with build-in models in Loopback. I need to extend my built-in model - User with custom relations.
// Extend properties
var properties = {
};
// Extend options
var options = {
relations: {
rooms: {
type: "hasMany",
model: "Room",
foreignKey: ""
}
}
};
// Call method
loopback.Model.extend('User', properties, options);
But it isn't work in my case, after restarting server model has't new rest-method and new properties.
Maybe I do something wrong, but maybe now communite has new solution for it?