[editor] Don't check for column existence in the location handler when a column is prefixed with a table name or alias
silenceErrors: true,
successCallback: function (data) {
try {
- if (typeof data.columns !== 'undefined' && data.columns.indexOf(location.identifierChain[0].name) !== -1) {
+ if (typeof data.columns !== 'undefined' && data.columns.indexOf(location.identifierChain[0].name.toLowerCase()) !== -1) {
location.identifierChain = nextTable.identifierChain.concat(location.identifierChain);
delete location.tables;
token.parseLocation = location;
findIdentifierChainInTable(tablesToGo);
}
};
-
+ if (location.tables.length > 1) {
findIdentifierChainInTable(location.tables.concat());
+ } else if (location.tables.length == 1 && location.tables[0].identifierChain) {
+ location.identifierChain = location.tables[0].identifierChain.concat(location.identifierChain);
+ delete location.tables;
+ token.parseLocation = location;
+ activeTokens.push(token);
+ }
} else {
token.parseLocation = location;
activeTokens.push(token);
