Skip to content
This repository has been archived by the owner on Jul 25, 2018. It is now read-only.

Commit

Permalink
connect events (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henni authored and SANDR00 committed Apr 22, 2017
1 parent 5de4628 commit 6dc7aa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/models/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ module.exports = function(sequelize, DataTypes) {
this.hasOne(models.contains);

this.hasMany(models.relationshipEntities);

this.hasMany(models.events);
}
}

Expand Down
7 changes: 6 additions & 1 deletion api/models/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ module.exports = function(sequelize, DataTypes) {
type:DataTypes.TEXT
}
}, {
freezeTableName: true // Model tableName will be the same as the model name
freezeTableName: true, // Model tableName will be the same as the model name
classMethods: {
associate: function(models) {
this.belongsTo(models.entities);
}
}
});
};

0 comments on commit 6dc7aa2

Please sign in to comment.