Skip to content

Commit e13de7f

Browse files
committed
fix populate all returning nested
1 parent c6aa765 commit e13de7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "flogou <florent.gouget@gmail.com>",
33
"name": "angular-orm",
4-
"version": "2.0.3",
4+
"version": "2.0.4",
55
"description": "",
66
"homepage": "",
77
"dependencies": {

src/ActiveRecord.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ export default function ActiveRecord (model, name, SManager = SessionManager(mod
377377
// Get from the model the fields that reference another object
378378
var pop = _.pick(model, function (v) {
379379
if (_.isArray(v))
380-
return v[ 0 ].ref;
381-
return v.ref;
380+
return v[ 0 ].ref && !v[ 0 ].nested;
381+
return v.ref && !v.nested;
382382
});
383383

384384
if (populateArray === 'all') {

0 commit comments

Comments
 (0)