You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by Paul Benedict <pa...@yahoo.com> on 2006/04/07 05:43:47 UTC

Re: Help with ticket IBATIS-225 [commiters especially]

I am looking for other people interested in expanding the use of the
@resultMap attribute within a result map. Right now the attribute is used exclusively
for collection associations, but I think it also can have the power to
inline other result mappings.

The reason behind this is simple: eager fetching is joining to another
table and pulling back a related object, but if this related object
already has a standalone result map defined, it makes sense to reuse
it. There's really not much of a semantical difference between pulling
back a collection of X or a single item of X, so that's what I intend
to implement within IBATIS.

However, I am having a difficult time decyphing how the BasicResultMap
class works. Clinton is busy (understandbly so!), so does anyone else have
an interest in helping me develop this solution? Please write back to the
dev boards here so we can work together.

Paul

--- Clinton Begin <cl...@gmail.com> wrote:

> Hi Paul,
> 
> I'm swamped right now.  But if you try to put something together, I should
> be able to look at it.  If you can get it to work, I don't have any problem
> reviewing it with the rest of the team and committing it.
> 
> If you like, feel free to email the dev list and ask for help from others.
> 
> Cheers,
> Clinton
> 
> On 4/6/06, Paul Benedict <pa...@yahoo.com> wrote:
> >
> > Clinton, I have some time to devote to this. Do you? Here's my thinking:
> >
> > BasicResultMap.getResults() iterates a fix list of result mappings. I
> > don't
> > think we can do any sort of "expansion" with a @resultMap because of this,
> > but I am trying to find a method that will simply decode a sub resultmap
> > without incrementing the ResultSet?
> >
> > I am beginning to look at non-collection @resultMap to be like an implicit
> > inheritence, would you? It's just a listing of additional properties to
> > decode. What do you think?
> >
> > Paul
> >
> >
> > --- Clinton Begin <cl...@gmail.com> wrote:
> >
> > > I can have a look at it.  I'm not sure what's involved, as that wasn't
> > the
> > > original idea behind @resultMap.  On the surface, it looks simple.
> > >
> > >
> > > Cheers,
> > > Clinton
> > >
> > >
> > > On 3/30/06, Paul Benedict <pa...@yahoo.com> wrote:
> > > >
> > > > I have a business need for issue 225:
> > > > http://issues.apache.org/jira/browse/IBATIS-225
> > > >
> > > > It's too cumbersome to repeat a large result set mapping in another
> > > > query when eager fetching is required (joining to get a related
> > object).
> > > > I should be able to use @resultMap without needing a collection.
> > > >
> > > > I am willing to work on it but I need someone else's help
> > > > because I do not know the ibatis source code as well as
> > > > I should :-) I believe the change needs to be made to
> > > > com.ibatis.sqlmap.engine.mapping.result.BasicResultMap
> > > > in method setNestedResultMappingValue.
> > > >
> > > > Is anyone willing to discuss this issue to develop a solution?
> > > >
> > > > Paul
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam?  Yahoo! Mail has the best spam protection around
> > > > http://mail.yahoo.com
> > > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com