Open mike-zenith opened 10 years ago
I want to create a 'hasMany' association thru a table which has composite, user defined unique keys
Im currenlty using a workaround with hooks to reach the same effect
eg:
var User = db.define('user', { name: { type: 'string', size: 32 } }); var Badge = db.define('badge' { name: { type: 'string', size: 32 } }); User.hasMany('badges', Badge, { level: { type: 'integer', size: 1 } }, { reverse: true, unique: ['user_id', 'badges_id', 'level' ] });
Not that I'm aware of.
I want to create a 'hasMany' association thru a table which has composite, user defined unique keys
Im currenlty using a workaround with hooks to reach the same effect
eg: