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
|
@ -89,11 +89,11 @@ public class HandlerRelationMapTableFieldStrategy
|
||||||
if (isUni1ToMFK()) {
|
if (isUni1ToMFK()) {
|
||||||
sel.whereForeignKey(field.getElementMapping().getForeignKey(),
|
sel.whereForeignKey(field.getElementMapping().getForeignKey(),
|
||||||
sm.getObjectId(), field.getElementMapping().getDeclaredTypeMapping(), store);
|
sm.getObjectId(), field.getElementMapping().getDeclaredTypeMapping(), store);
|
||||||
|
sel.select(vals[idx], field.getElementMapping().
|
||||||
|
getSelectSubclasses(), store, fetch, eagerMode, null);
|
||||||
} else {
|
} else {
|
||||||
sel.whereForeignKey(field.getJoinForeignKey(),
|
sel.whereForeignKey(field.getJoinForeignKey(),
|
||||||
sm.getObjectId(), field.getDefiningMapping(), store);
|
sm.getObjectId(), field.getDefiningMapping(), store);
|
||||||
}
|
|
||||||
if (!isUni1ToMFK()) {
|
|
||||||
Joins joins = joinValueRelation(sel.newJoins(), vals[idx]);
|
Joins joins = joinValueRelation(sel.newJoins(), vals[idx]);
|
||||||
sel.select(vals[idx], field.getElementMapping().
|
sel.select(vals[idx], field.getElementMapping().
|
||||||
getSelectSubclasses(), store, fetch, eagerMode, joins);
|
getSelectSubclasses(), store, fetch, eagerMode, joins);
|
||||||
|
@ -102,9 +102,6 @@ public class HandlerRelationMapTableFieldStrategy
|
||||||
//### thus we can use first mapping of union only
|
//### thus we can use first mapping of union only
|
||||||
if (idx == 0)
|
if (idx == 0)
|
||||||
resJoins[1] = joins;
|
resJoins[1] = joins;
|
||||||
} else {
|
|
||||||
sel.select(vals[idx], field.getElementMapping().
|
|
||||||
getSelectSubclasses(), store, fetch, eagerMode, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue