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

Commit 9a9f2c18 by Jan Aagaard Meier

Fix a belongsTo + hasMany relation incorrectly being identified as n:m. Closes #2159

1 parent fe9fdc94
Showing with 1 additions and 1 deletions
......@@ -69,7 +69,7 @@ module.exports = (function() {
*/
else if (this.through) {
_.each(this.target.associations, function (association, accessor) {
if (self.source === association.target) {
if (self.source === association.target && association.associationType === 'HasMany') {
var paired = false
// If through is default, we determine pairing by the accesor value (i.e. DAOFactory's using as won't pair, but regular ones will)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!