0
Возможно ли установить псевдоним для атрибута модели (столбца)?Настройка псевдонима атрибута для модели
//User.js
attributes: {
favoriteDog: {
type: 'string',
alias: 'fav_dog' //in sails console this specific syntax doesn't do anything
}
}
...
User.find({where: {id: 45}}).exec(function(row) {
console.log(row.favoriteDog);
console.log(row.fav_dog); //should get same value
});
В документах ничего не найдено.
ли это решить проблему? –