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

Commit e5c630bf by José Moreira

TestUnit: fix relation between User and SomeConnection

1 parent 18f7c7e3
Showing with 9 additions and 9 deletions
......@@ -26,17 +26,17 @@ describe(Support.getTestDialectTeaser("Include"), function () {
C = S.define('C', { name: DT.STRING(40) }, { paranoid: true })
// Associate them
User.hasMany( SomeConnection )
User.hasMany( SomeConnection, { foreignKey: 'u' })
SomeConnection
.belongsTo( User, { foreignKey: 'u' } )
.belongsTo( A, { foreignKey: 'fk', })
.belongsTo( B, { foreignKey: 'fk', })
.belongsTo( C, { foreignKey: 'fk', })
A.hasMany( SomeConnection, { foreignKey: 'fk', })
B.hasMany( SomeConnection, { foreignKey: 'fk', })
C.hasMany( SomeConnection, { foreignKey: 'fk', })
.belongsTo( User, { foreignKey: 'u' })
.belongsTo( A, { foreignKey: 'fk' })
.belongsTo( B, { foreignKey: 'fk' })
.belongsTo( C, { foreignKey: 'fk' })
A.hasMany( SomeConnection, { foreignKey: 'fk' })
B.hasMany( SomeConnection, { foreignKey: 'fk' })
C.hasMany( SomeConnection, { foreignKey: 'fk' })
// Sync them
S.sync({ force: true }).done( function () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!