ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Klose <...@calitrix.de>
Subject Lazily loading user defined types
Date Tue, 07 Nov 2006 18:39:10 GMT

i'm trying to do lazy loading on user defined properties, e.q. beans on
1:1 relationships. However, it isn't working as i'm not using cglib. I
found a message in another thread in this list, stating that lazy
loading would work on user defined properties if they are typed as
interfaces. But this didn't worked, too. I tried several things,
starting from defining the bean properties as interface types and ending
with an own ResultObjectFactory which instanciates the propper concrete
class if a resultClass attribute in a sql map is set to an interface
type. None of it worked.

I don't really know (yet) what this proxy stuff on interfaces means as
i'm seeing it the first time now, but from the code in
com.ibatis.sqlmap.engine.mapping.result.loader i figured out that this
proxy stuff is only done on collection types, not user defined ones.

Is there a way to get lazy loading working

a) without writing own lazy loaders in the data model beans
b) withoug using cglib?

Is it possible to extend the LazyResultLoader to create the proxies not
only on collection types, or can this be only done on these?
Or am i just doing something wrong? ;)


Johannes Klose

View raw message