diff --git a/lib/Instance.js b/lib/Instance.js index c98f74f4..d0a95b7d 100755 --- a/lib/Instance.js +++ b/lib/Instance.js @@ -312,7 +312,7 @@ function Instance(Model, opts) { } } - for (i = 0; i < opts.extra_info.id; i++) { + for (i = 0; i < opts.extra_info.id.length; i++) { conditions[opts.extra_info.id_prop[i]] = opts.extra_info.id[i]; conditions[opts.extra_info.assoc_prop[i]] = opts.data[opts.id[i]]; }