Is it possible to specify an outer join for a <key-many-to-one> relationship?
Specifically, I have a persistant object A with a composite key. One of the elemets of those keys is an associated key-many-to-one assiciation with class B (I hope I have the terminology correct). I would like that when I load class A, class B would be loaded in an outer join. This is especially useful when class A itself is part of a collection loaded by yet another class C.
So I have:
C has a Set of A objects
A is associated with B
I would like that when I get the collection of A, the associated B objects would be outer joined while loading. Otherwise I would need to make a new db call for each element of A while iterating, which is obviously inefficent.
If outer joins are not possible with <key-many-to-one> associated classes, is there perhaps another way to do everything in one SQL call? I guess handcoding a query is one way, but is there some other "automatic" way?
Please let me know if you need any more specifics.
Thanks in advance,
Daniel
|