ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Nested Result Sets with inner joins (important!)
Date Mon, 21 Nov 2005 16:16:04 GMT
That's something we can definitely do.

But please do me a favour....don't use the "Hibernate can do this" as a
supporting argument. It's weak and is akin to after-school fights.

Hibernate is a very different product and the XML configuration goals are
almost impossible to compare in any way that is sensible.

Cheers,
Clinton


On 11/18/05, Jeff Butler <jeffgbutler@gmail.com> wrote:
>
> Wow - synchronicity. This is the same as IBATIS-225 (just filed). I agree
> that this should be fixed/enhanced. There are some issues, but we should be
> able to overcome them.
>  Jeff Butler
>
>  On 11/18/05, Paul Benedict <paul4christ79@yahoo.com > wrote:
> >
> > 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
> >
>
>

Mime
View raw message