mirror of https://github.com/apache/openjpa.git
OPENJPA-1253: clean up code for uni-directional one-to-many Map using foreign key strategy
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@818531 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d8eadfe600
commit
7d3497781c
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats
|
@ -89,11 +89,11 @@ public class HandlerRelationMapTableFieldStrategy
|
|||
if (isUni1ToMFK()) {
|
||||
sel.whereForeignKey(field.getElementMapping().getForeignKey(),
|
||||
sm.getObjectId(), field.getElementMapping().getDeclaredTypeMapping(), store);
|
||||
sel.select(vals[idx], field.getElementMapping().
|
||||
getSelectSubclasses(), store, fetch, eagerMode, null);
|
||||
} else {
|
||||
sel.whereForeignKey(field.getJoinForeignKey(),
|
||||
sm.getObjectId(), field.getDefiningMapping(), store);
|
||||
}
|
||||
if (!isUni1ToMFK()) {
|
||||
Joins joins = joinValueRelation(sel.newJoins(), vals[idx]);
|
||||
sel.select(vals[idx], field.getElementMapping().
|
||||
getSelectSubclasses(), store, fetch, eagerMode, joins);
|
||||
|
@ -102,10 +102,7 @@ public class HandlerRelationMapTableFieldStrategy
|
|||
//### thus we can use first mapping of union only
|
||||
if (idx == 0)
|
||||
resJoins[1] = joins;
|
||||
} else {
|
||||
sel.select(vals[idx], field.getElementMapping().
|
||||
getSelectSubclasses(), store, fetch, eagerMode, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Result res = union.execute(store, fetch);
|
||||
|
|
Loading…
Reference in New Issue