* Only prepend table name to query if access name doesn't contain "(" or "."
This makes it possible to use an SQL function as group criterium
This commit is contained in:
parent
5efab894ef
commit
8044f33450
2 changed files with 9 additions and 6 deletions
|
@ -908,9 +908,10 @@ public final class NodeManager {
|
||||||
b.append(rel.queryHints).append(" ");
|
b.append(rel.queryHints).append(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
b.append(table).append('.')
|
if (idfield.indexOf('(') == -1 && idfield.indexOf('.') == -1) {
|
||||||
.append(idfield).append(" FROM ")
|
b.append(table).append('.');
|
||||||
.append(table);
|
}
|
||||||
|
b.append(idfield).append(" FROM ").append(table);
|
||||||
|
|
||||||
rel.appendAdditionalTables(b);
|
rel.appendAdditionalTables(b);
|
||||||
|
|
||||||
|
|
|
@ -1242,8 +1242,10 @@ public final class Relation {
|
||||||
local = ref.getString(homeprop);
|
local = ref.getString(homeprop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (foreignName.indexOf('(') == -1 && foreignName.indexOf('.') == -1) {
|
||||||
q.append(otherType.getTableName());
|
q.append(otherType.getTableName());
|
||||||
q.append(".");
|
q.append(".");
|
||||||
|
}
|
||||||
q.append(foreignName);
|
q.append(foreignName);
|
||||||
q.append(" = ");
|
q.append(" = ");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue