From b3e63259d3126041719c117f364bea260f459464 Mon Sep 17 00:00:00 2001 From: Zachary Berry Date: Fri, 22 Feb 2013 21:32:21 -0500 Subject: [PATCH] Fixes an issue where hasMany association properties were not being checked --- lib/Associations/Many.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Associations/Many.js b/lib/Associations/Many.js index b2d099a4..6c89ea28 100644 --- a/lib/Associations/Many.js +++ b/lib/Associations/Many.js @@ -1,6 +1,7 @@ var InstanceConstructor = require("../Instance").Instance; var Singleton = require("../Singleton"); var Settings = require("../Settings"); +var Property = require("../Property"); exports.prepare = function (Model, associations) { Model.hasMany = function () { @@ -28,6 +29,10 @@ exports.prepare = function (Model, associations) { } if (props === null) { props = {}; + } else { + for (var k in props) { + props[k] = Property.check(props[k]); + } } var assocName = opts.name || ucfirst(name);