ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poitras Christian" <Christian.Poit...@ircm.qc.ca>
Subject RE: Lazy Load is pre loading 1-1 relationships
Date Tue, 11 Sep 2007 20:05:27 GMT
It seems that is works with my classes.
 
I don't use
private static final long serialVersionUID = -1699855014908794446L; 
I use.
static final long serialVersionUID = 7213712437136303104L;
 
Give it a try!
Christian
 

________________________________

From: Christopher.Mathrusse@sybase.com
[mailto:Christopher.Mathrusse@sybase.com] 
Sent: Tuesday, 11 September 2007 15:57
To: user-java@ibatis.apache.org
Subject: RE: Lazy Load is pre loading 1-1 relationships



That was it! I removed the variable definition from all my domain
objects, performed a clean and build and the lazy loading is now working
correctly. Thanks for the suggestion. 





Christopher.Mathrusse@sybase.com 

09/11/2007 12:30 PM 
Please respond to
user-java@ibatis.apache.org


To
user-java@ibatis.apache.org 
cc
user-java@ibatis.apache.org 
Subject
RE: Lazy Load is pre loading 1-1 relationships

	





This may actually answer my question. I recently added to my domain
objects the following: 

private static final long serialVersionUID = -1699855014908794446L; 

I added this to eliminate the warning that Eclipse was giving me. Any
object that I needed to touch as of recently I would add this to. The
domain objects that are not lazily loading seem to be the ones that I
added serialVersionUID to. 

Thanks for the help... 




"Poitras Christian" <Christian.Poitras@ircm.qc.ca> 

09/11/2007 12:22 PM 

Please respond to
user-java@ibatis.apache.org

To
<user-java@ibatis.apache.org> 
cc
Subject
RE: Lazy Load is pre loading 1-1 relationships


	





I doubt my reply will answer your question, but this is mostly for
information purpose. 
 
All final classes are never lazy loaded by iBATIS. This include any
primitive type, Strings and this like Integer, Double, etc... 
This "bug" is probably due to the fact that cglib tries to extend the
class. If it is final, it must be loaded now. 
 
Christian 


________________________________

From: Christopher.Mathrusse@sybase.com
[mailto:Christopher.Mathrusse@sybase.com] 
Sent: Tuesday, 11 September 2007 15:12
To: user-java@ibatis.apache.org
Subject: Lazy Load is pre loading 1-1 relationships


I've been spending a fair amount of time on this now but I can't seem to
get any further. Objects that I am attempting to load lazily are simply
loading. The relationships that are 1-M seem to be fine, meaning that
they are not pre-loading, but any relationship that I have that is a 1-1
seems to be loaded when the resultSet is applied to the parent object.
Is there anything I can do to prevent this from happening? 

Thanks... 


Mime
View raw message