Autoretrieval of 1-1 bidirectional single foreign key fields using Fetch Plans or the Default Fetch Group
While using JPOX for autoretrieval of 1-1 bidirectional single foreign key fields using Fetch Plans or the Default Fetch Group, I get the following error:
Here's the error message:
Testcase: testIPM(org.eremite.*.*): Caused an ERROR JPOX doesn't yet support having 1-1 bidirectional single-FK fields being retrieved in the DFG/FetchPlan javax.jdo.JDOUserException: JPOX doesn't yet support having 1-1 bidirectional single-FK fields being retrieved in the DFG/FetchPlanat org.jpox.store.mapping.Mappings.
selectMapping(Mappings.java:119)
at org.jpox.store.rdbms.scostore.AbstractSetStore.
newResultObjectFactory(AbstractSetStore.java:1067)
at org.jpox.store.rdbms.scostore.AbstractSetStore.
iterator(AbstractSetStore.java:250)
at org.jpox.sco.Collection.
loadFromStore(Collection.java:688)
at org.jpox.sco.Collection.
iterator(Collection.java:454)
at org.jpox.sco.Collection.
detachCopy(Collection.java:234)
at org.jpox.state.DetachFieldManager.
fetchObjectField(DetachFieldManager.java:62)
at org.jpox.state.StateManagerImpl.
replacingObjectField(StateManagerImpl.java:2500)
at org.eremite.*.*.*.jdoReplaceField(*.java)
...
Apparently, JPOX doesn't support this functionality yet. I'm using the 1.1.0-Beta-03 release, and this might have been implemented since then. The latest release was Beta-05, which I'll try before I go any further on this. When I'm done, I'll have to write some information on using Fetch groups and Fetch plans in persistence management. Systematically walking through your object trees and detaching fields is not something you should have to do, and JDO 2.0 provides utilities around it in the Spec.
In trying to resolve this problem, I decided to attempt to upgrade to jpox-2.0-beta-5, which does not have a maven plugin. So, I upgraded the beta-3 plugin, and I've got different problems now. I'm still not certain that making the leap to 2.0-beta-5 was wise.
music: bach, "Gleich wie der Regen und Schnee vom Himmel fällt"
