ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikkapl <fo...@wp.pl>
Subject [resultMap] related objects
Date Thu, 02 Apr 2009 10:58:48 GMT

I want to get Object related to another object like this (I bolded important

Company {
Integer id;
String name;
Address address;

Address {
Integer addressId;
String street;

SELECT c.*, a.*
FROM companies c, addresses a
WHERE a.address_id = c.address_id;

...and there is a problem with resultMap:

something like that doesn't work:

<resultMap id="addr-result" class="Address">
<result property="addressId" column=".." />
<result property="street" column=".." />

<resultMap id="comp-result" class="Company">
<result property="id" column=".." />
<result property="name" column=".." />
<result property="address" resultMap="address-result" />

View this message in context: http://www.nabble.com/-resultMap--related-objects-tp22845356p22845356.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message