ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Langer <mailtolan...@googlemail.com>
Subject Re: How to handle null objects in nested ResultMaps
Date Thu, 30 Nov 2006 08:27:23 GMT
Larry Meadors wrote:
> Not really, no.
>
> If you run this SQL in a database tool, it may become apparent
> why..there is data there, it's just null. So iBATIS creates that
> data...even if it is null.
Well the data is there because I'm doing a left join and there are no 
pages. This I understand. What I'm interested in knowing is if IBatis 
provides a mean to make this be handeled transparently while still 
handling the N+1 Problem.
>
> The quick solution is to look at the data returned, and remove that
> data if you do not want it there.
Is there someway I can do this through IBatis, like TypeHandler or 
something like that, or do I have to do this on my own in my Domainmodels?
>
> A better solution might be to add functionality to iBATIS to do this,
> so you could tell it to look at a field and if it was null, to skip
> the population of the child list.
 From this I gather that IBatis does not provide such a functionality 
and I will have to dig in and provide it myself? Am I correct?

Thanks for your help

Regards
Stefan

Mime
View raw message