eubnara / study

6 stars 2 forks source link

sequelize accessor 함수명 알아내는 법 #115

Open eubnara opened 5 years ago

eubnara commented 5 years ago

https://medium.com/@jasmine.esplago.munoz/feeling-the-magic-with-sequelize-magic-methods-e9cc89ecdcc5

console.log(Object.keys(currentUser.__proto__));
eubnara commented 5 years ago

http://docs.sequelizejs.com/class/lib/associations/belongs-to.js~BelongsTo.html

In the API reference below, add the name of the association to the method, e.g. for User.belongsTo(Project) the getter will be user.getProject().