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

Commit b704d169 by Mick Hansen

fix(associations): 1:1 (belongsTo & hasOne) associations should use limit: null …

…by default since they are querying on primary key, closes #2698
1 parent 3d5c1fd0
...@@ -108,6 +108,8 @@ module.exports = (function() { ...@@ -108,6 +108,8 @@ module.exports = (function() {
params.where = new Utils.and(params.where); params.where = new Utils.and(params.where);
if (params.limit === undefined) params.limit = null;
return association.target.find(params); return association.target.find(params);
}; };
......
...@@ -102,6 +102,8 @@ module.exports = (function() { ...@@ -102,6 +102,8 @@ module.exports = (function() {
params.where = new Utils.and(params.where); params.where = new Utils.and(params.where);
if (params.limit === undefined) params.limit = null;
return association.target.find(params); return association.target.find(params);
}; };
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!