iBATIS will populate child objects if there is ANY non-null data
mapped to the child in the result map.  If you don't want iBATIS to
create the child, make sure it's mapped to null data...there's really
no reason why you shouldn't be able to achieve this.

Cheers,
Clinton


On Fri, 25 Feb 2005 12:23:03 -0800 (PST), Karen Koch
<[EMAIL PROTECTED]> wrote:
> 
> 
> Sorry if this winds up being a duplicate submission, but I sent this this
> morning and it doesn't appear to have posted to the list yet... 
> 
> In a situation where one domain object has a complex property
> (java.util.List
> of objects of another type), and you've modeled that 1:N relationship using
> the
> new 2.0.9 groupBy feature to nest ResultMaps... Say the number of child
> records
> is zero, but you still want to populate the parent object. Do you write your
> select statement with an outer join? Will executing that statement result in
> a
> populated parent object with an empty List?
> 
> This is what I've tried, and it doesn't seem to be working for me. It
> appears
> as if iBATIS is still trying to create one child object based on the child
> ResultMap and is looking for me to provide specify nullValues for each
> field. 
> This isn't really the behavior I want. Any suggestions?
> 
> Karen Koch
> Programmer/Analyst
> Information Development Consultants
> Chicago,

Reply via email to