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

Commit 3fe76192 by Matt Broadstone

support specifying the field of a foreign key for mssql

The MSSQL dialect implements its own sql generator, and was accidentally
adding an extra raw attribute for an aliased field
1 parent 16ebcdd7
Showing with 2 additions and 1 deletions
......@@ -138,9 +138,10 @@ module.exports = (function() {
var modelAttributeMap = {};
if (modelAttributes) {
Utils._.each(modelAttributes, function(attribute, key) {
modelAttributeMap[key] = attribute;
if (attribute.field) {
modelAttributeMap[attribute.field] = attribute;
} else {
modelAttributeMap[key] = attribute;
}
});
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!