Use proper subnode relation in getPropertyNames().
This commit is contained in:
parent
2790dde1b4
commit
e9954c5898
1 changed files with 12 additions and 9 deletions
|
@ -1100,11 +1100,7 @@ public final class NodeManager {
|
||||||
} else {
|
} else {
|
||||||
// let relation object build the query
|
// let relation object build the query
|
||||||
q.append(rel.buildQuery(home, home.getNonVirtualParent(), null,
|
q.append(rel.buildQuery(home, home.getNonVirtualParent(), null,
|
||||||
" WHERE ", false));
|
" WHERE ", true));
|
||||||
|
|
||||||
if (rel.getOrder() != null) {
|
|
||||||
q.append(" order by " + rel.getOrder());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logSql) {
|
if (logSql) {
|
||||||
|
@ -1412,9 +1408,16 @@ public final class NodeManager {
|
||||||
Statement stmt = null;
|
Statement stmt = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String q = new StringBuffer("SELECT ").append(namefield).append(" FROM ")
|
StringBuffer q = new StringBuffer("SELECT ").append(namefield).append(" FROM ")
|
||||||
.append(table).append(" ORDER BY ")
|
.append(table);
|
||||||
.append(namefield).toString();
|
|
||||||
|
if (home.getSubnodeRelation() != null) {
|
||||||
|
q.append(" ").append(home.getSubnodeRelation());
|
||||||
|
} else {
|
||||||
|
// let relation object build the query
|
||||||
|
q.append(rel.buildQuery(home, home.getNonVirtualParent(), null,
|
||||||
|
" WHERE ", true));
|
||||||
|
}
|
||||||
|
|
||||||
stmt = con.createStatement();
|
stmt = con.createStatement();
|
||||||
|
|
||||||
|
@ -1422,7 +1425,7 @@ public final class NodeManager {
|
||||||
app.logEvent("### getPropertyNames: " + q);
|
app.logEvent("### getPropertyNames: " + q);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultSet rs = stmt.executeQuery(q);
|
ResultSet rs = stmt.executeQuery(q.toString());
|
||||||
|
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
String n = rs.getString(1);
|
String n = rs.getString(1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue