I have an Office object and a Device Object. An Office has a device and a device belongs to an office. So, obtaining an Office object should populate Office.Device reference and a Device object should have an Office object where it belongs. It's a circular reference I suppose.
I'd like to do this in iBATIS, but I can't figure out how to do it properly.
It is almost like I need a resultMap where I can "set this property to the object created by the resultMap which just called me". Rather then populate this property (object) with another query (N+1, I know) or populate this property using the resultset and this other resultMap.
I don't mind creating another resultMap for this scenario.
Another perfectly acceptable answer is that iBATIS doesn't do this because your schema is flawed. If that is the case, give me some other options.