ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fearghal O Maolcatha" <fearghal.omaolca...@gmail.com>
Subject Handling 0..1 association?
Date Mon, 08 Oct 2007 13:11:52 GMT

I have a class A that may or may not contain a reference to an associated
class B. I'm doing a left outer join between the table being represented by
class A and the table being represented by class B. If there is no match in
the table represented by class B then Ibatis still returns a reference to an
instance of class B with all properties set to their defaults. I would have
expected the reference to be set to null. Is there a way to achieve this
behaviour (having the reference set to null when there is no corresponding
instance), or do I need to write a customer handler?


View raw message