不要怂,就是干,撸起袖子干!

Commit 14898eb8 by Mick Hansen

test(n:m): add test trying to reproduce #2574, seems to work however so closing #2574

1 parent 9e78d786
Showing with 24 additions and 0 deletions
......@@ -1477,6 +1477,30 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
return this.sequelize.sync({ force: true });
});
it('should work with non integer primary keys', function () {
var Beacons = this.sequelize.define('Beacon', {
id: {
primaryKey: true,
type: DataTypes.UUID
},
name: {
type: DataTypes.STRING,
}
});
// Usar not to clash with the beforEach definition
var Users = this.sequelize.define('Usar', {
name: {
type: DataTypes.STRING
}
});
Beacons.hasMany(Users);
Users.hasMany(Beacons);
return this.sequelize.sync({force: true, logging: true});
});
it('uses the specified joinTableName or a reasonable default', function() {
for (var associationName in this.User.associations) {
expect(associationName).not.to.equal(this.User.tableName);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!