Clinton,
One of the most disappointing aspects of IBATIS has to be the inability to
reuse result maps for
nested properties. IBATIS only allows me to use them if I [1] use another
select or [2] use a
collection. I get this error every time:
"Error instantiating collection property for mapping 'apple'."
I ask this because sometimes I need to do joins for efficiency and want to
reuse my resultMap to
populate my inner objects. The user guide talks about how we can use the nested
notation to get
this done, but it's too much work to list out all the properties again. I would
love to see
something like this come along soon:
<resultMap id="fruitMap" class="TootyFruity">
<result property="apple" resultMap="appleMap"/>
<result property="orange" resultMap="orangeMap"/>
</resultMap>
<resultMap id="appleMap" class="Apple">
<result property="id" column="id"/>
<result property="name" column="name"/>
</resultMap>
This way I can write a select to populate "fruitMap" that joins to APPLE and
ORANGE and use my
existing maps for them to populate them as children of TootyFruit. --Gotta love
the names!
What do you think? This is very important to me. Hibernate can do this, why
can't we?
Thanks!
Paul
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs