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

Commit 7639e69f by Jan Aagaard Meier

Merge head

2 parents 51821a8b f2037798
Showing with 7 additions and 0 deletions
...@@ -128,6 +128,10 @@ module.exports = (function() { ...@@ -128,6 +128,10 @@ module.exports = (function() {
attributes = Utils._.defaults(attributes, unassociatedObject[association.connectorDAO.name], defaultAttributes) attributes = Utils._.defaults(attributes, unassociatedObject[association.connectorDAO.name], defaultAttributes)
} }
if (association.customJoinTableModel) {
attributes = Utils._.defaults(attributes, unassociatedObject[association.connectorDAO.name], defaultAttributes)
}
return attributes return attributes
}) })
...@@ -155,9 +159,12 @@ module.exports = (function() { ...@@ -155,9 +159,12 @@ module.exports = (function() {
var sourceKeys = Object.keys(this.__factory.source.primaryKeys); var sourceKeys = Object.keys(this.__factory.source.primaryKeys);
var targetKeys = Object.keys(this.__factory.target.primaryKeys); var targetKeys = Object.keys(this.__factory.target.primaryKeys);
<<<<<<< HEAD
attributes[this.__factory.identifier] = ((sourceKeys.length === 1) ? this.instance[sourceKeys[0]] : this.instance.id) attributes[this.__factory.identifier] = ((sourceKeys.length === 1) ? this.instance[sourceKeys[0]] : this.instance.id)
attributes[foreignIdentifier] = ((targetKeys.length === 1) ? newAssociation[targetKeys[0]] : newAssociation.id) attributes[foreignIdentifier] = ((targetKeys.length === 1) ? newAssociation[targetKeys[0]] : newAssociation.id)
=======
>>>>>>> f20377983f85cc09a62ba96d1502d0172dfd366a
if (exists) { // implies customJoinTableModel === true if (exists) { // implies customJoinTableModel === true
var where = attributes var where = attributes
attributes = Utils._.defaults({}, newAssociation[association.connectorDAO.name], additionalAttributes) attributes = Utils._.defaults({}, newAssociation[association.connectorDAO.name], additionalAttributes)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!