You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Ou, Stan (Mission Systems)" <ST...@ngc.com> on 2006/12/08 00:20:30 UTC

mapping results to a join sql query

hi,
 
I read the manual but didn't find anything.  there might be a simple
solution to this. 
 
1. I've a join sql, say select a,b,c,x,y,z from tableA, tableX where a
=x
2. i've 2 pojo's say pojoA and pojoB that contains properties a,b,c and
x,y,z respectively.
3. i've 2 ibatis xml's that each maps the pojo to its table. they're in
the same namespace.
here in pojoA.xml, I've the join sql mentioned in #1.  my question is
how do I map the properties from pojoB.xml?
 
i tried append them to the existing properties like below, but ibatis
complainted there is no writable properties.
 
//existing properties
<result property="a" column="a"/>
 
//newly appended
<result property="x" column="myNamespace.x"/>
 
the error was no writable property for x.
 
any help is appreciated. thanks
 
Stan