Skip to content

Commit

Permalink
Fixes duplicate column in SELECT (#313)
Browse files Browse the repository at this point in the history
This was because a property that was defined as an ID was already added
to model_fields before.
  • Loading branch information
dresende committed Aug 26, 2013
1 parent 1996236 commit 43a0249
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function Model(opts) {
for (k in opts.properties) {
opts.properties[k] = Property.normalize(opts.properties[k], opts.settings);

if (opts.properties[k].lazyload !== true) {
if (opts.properties[k].lazyload !== true && model_fields.indexOf(k) == -1) {
model_fields.push(k);
}
if (opts.properties[k].required) {
Expand Down

0 comments on commit 43a0249

Please sign in to comment.