ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Bayon" <ibatis....@gmail.com>
Subject Re: LazyLoadProxyFactory bug? Ignores listClass during attempt to build proxy
Date Wed, 10 May 2006 16:52:45 GMT
I known that I must polish the Lazy load support.
Could you give me an example of you domain objects and the mapping you are
using.

Thanks,
-Gilles


On 5/10/06, Jeremy Gray <jgray@siberra.com> wrote:
>
>  I think I may have found a bug in the more recent LazyLoadProxyFactory.
> If the list type in the domain object implements IList and a listClass is
> specified in the sql map, ibatis ignores the list class setting and instead
> attempts to build a proxy for the list type defined in the domain object. In
> our case, the domain objects for which we have been lazy loading properties
> have had their exposed types set to IList (so that we could trade off custom
> collections against lazy-loaded lists just by changing the config) but the
> sql map has been set to use the custom collection. Older versions of ibatis
> would ignore the lazyload attribute when a listclass was present, but with
> the new proxy-generating codebase, it reverses this, obeying the lazyload
> but ignoring the listclass and trying to instead proxy the IList (which of
> course fails).
>
>
>
> The fix, based on my limited testing today, is quite simple, involving a
> one line change from this (currently on line 95):
>
>
>
> proxy = ProxyGeneratorFactory.GetProxyGenerator().CreateClassProxy(typeProxified,
> handler, Type.EmptyTypes);
>
>
>
> to this:
>
>
>
> proxy = ProxyGeneratorFactory.GetProxyGenerator().CreateClassProxy(
> mappedStatement.Statement.ListClass, handler, Type.EmptyTypes);
>
>
>
>
>
>
>
> *Jeremy Gray*
> *Development Lead, SIMM Services*
> *siberra*
> DIGITAL MEDIA SYSTEMS
> Tel:  604-696-3230
> jgray@siberra.com
> www.siberra.com
>
>
>

Mime
View raw message