#1837 (#1740 and #1744) - Inheritance on both sides of @ManyToOne

This change also relates back to #1740 and #1744 and changes the way that issue was fixed (by SqlTreeNodeBean on partially populated non-id inheritance bean).
This commit is contained in:
rob bygrave
2019-10-13 11:46:11 +13:00
parent a474880735
commit f24b4dba71
10 changed files with 21 additions and 42 deletions
@@ -112,7 +112,7 @@ class DefaultDbSqlContext implements DbSqlContext {
}
@Override
public void addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2, String inheritance) {
public void addJoin(String type, String table, TableJoinColumn[] cols, String a1, String a2) {
if (tableJoins == null) {
tableJoins = new HashSet<>();
@@ -166,11 +166,6 @@ class DefaultDbSqlContext implements DbSqlContext {
}
}
// add on any inheritance where clause
if (inheritance != null && !inheritance.isEmpty()) {
sb.append(" and ").append(a2).append(".").append(inheritance);
}
if (addAsOfOnClause) {
sb.append(" and ").append(historySupport.getAsOfPredicate(a2));
}