Guest User

Untitled

a guest
Jul 20th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. A.associate = function(models) {
  2. A.belongsToMany(models.B, {
  3. through: 'A_B',
  4. as: 'Bs',
  5. foreignKey: 'a_id'
  6. });
  7. };
  8.  
  9. C.associate = function(models) {
  10. C.hasMany(models.A_B, {
  11. as: 'ABs',
  12. foreignKey: 'c_id'
  13. });
  14. };
  15.  
  16. Error: C.hasMany called with something that's not a subclass of Sequelize.Model
Add Comment
Please, Sign In to add comment