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

Commit a3f7d94b by Joel Trost Committed by Matt Broadstone

Fixed schema delimiting

1 parent ec40906e
......@@ -160,7 +160,6 @@ module.exports = (function() {
ignoreKeys = [];
for(var key in attributes){
//console.log('some more action', attributes.deletedAtThisTime);
var aliasKey = attributes[key].field || key;
if(ignoreKeys.indexOf(aliasKey) < 0){
ignoreKeys.push(aliasKey);
......@@ -363,7 +362,7 @@ module.exports = (function() {
var casKey2 = cascadeCheck[j];
if(attributes[casKey].referencesKey === attributes[casKey2].referencesKey){
console.warn('MSSQL does not support multiple cascade keys on the same reference, '
+ 'we will removing them to make this work but we recommend restructuring your query.');
+ 'we will remove them to make this work but we recommend restructuring your query.');
attributes[casKey].onDelete = '';
attributes[casKey].onUpdate = '';
attributes[casKey2].onDelete = '';
......
......@@ -246,14 +246,13 @@ module.exports = {
},
quoteTable: function(param, as) {
var table = '';
if (as === true) {
as = param.as || param.name || param;
}
if (_.isObject(param)) {
if (param.schema) {
table += param.schema + '.';
table += param.schema + (param.delimiter || '.');
}
table += param.tableName;
table = quoteIdentifier(table);
......@@ -607,7 +606,6 @@ module.exports = {
if (attribute.references) {
template.push(attributeMap.references);
template.push(this.quoteTable(attribute.references));
if (attribute.referencesKey) {
template.push('(' + quoteIdentifier(attribute.referencesKey) + ')');
} else {
......@@ -718,7 +716,6 @@ module.exports = {
return query.join(' ');
},
getJoinClause: function(model, include){
//console.log(include.through);
var query = [];
var primaryKey = quoteIdentifier(model.primaryKeyAttribute);
var joinType = include.required ? 'INNER JOIN' : 'LEFT OUTER JOIN';
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!