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

You need to sign in or sign up before continuing.
Commit c3b565fd by Charles Hill

Fix for eager loading of parent data in many to one relationship; where the pare…

…nt has a primary key specified.
1 parent f8b516da
Showing with 4 additions and 1 deletions
...@@ -1075,7 +1075,10 @@ module.exports = (function() { ...@@ -1075,7 +1075,10 @@ module.exports = (function() {
if (include.hasOwnProperty('attributes')) { if (include.hasOwnProperty('attributes')) {
var primaryKeys; var primaryKeys;
if (include.daoFactory.hasPrimaryKeys) { if (include.daoFactory.hasPrimaryKeys) {
primaryKeys = include.daoFactory.primaryKeys primaryKeys = []
for (var field_name in include.daoFactory.primaryKeys) {
primaryKeys.push(field_name)
}
} else { } else {
primaryKeys = ['id'] primaryKeys = ['id']
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!