ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject RE: Lazy Load is pre loading 1-1 relationships
Date Tue, 11 Sep 2007 19:57:18 GMT

<br><font size=2 face="sans-serif">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.</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Christopher.Mathrusse@sybase.com</b>
</font>
<p><font size=1 face="sans-serif">09/11/2007 12:30 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
user-java@ibatis.apache.org</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td valign=top><font size=1 face="sans-serif">user-java@ibatis.apache.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">user-java@ibatis.apache.org</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">RE: Lazy Load is pre loading
1-1 relationships</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
This may actually answer my question. I recently added to my domain objects
the following:</font><font size=3> <br>
</font><font size=2 color=#820040 face="Courier New"><b><br>
private</b></font><font size=2 face="Courier New"> </font><font
size=2 color=#820040 face="Courier New"><b>static</b></font><font
size=2 face="Courier New">
</font><font size=2 color=#820040 face="Courier New"><b>final</b></font><font
size=2 face="Courier New">
</font><font size=2 color=#820040 face="Courier New"><b>long</b></font><font
size=2 face="Courier New">
</font><font size=2 color=#0021bf face="Courier New"><i>serialVersionUID</i></font><font
size=2 face="Courier New">
= -1699855014908794446L;</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
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.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Thanks for the help...</font><font size=3> <br>
<br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=53%><font size=1 face="sans-serif"><b>&quot;Poitras Christian&quot;
&lt;Christian.Poitras@ircm.qc.ca&gt;</b> </font>
<p><font size=1 face="sans-serif">09/11/2007 12:22 PM</font><font size=3>
</font>
<br>
<table border=4 width=100%>
<tr valign=top>
<td width=100% bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
user-java@ibatis.apache.org</font></div></table>
<p>
<td width=46%>
<table width=100%>
<tr>
<td width=15%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=84% valign=top><font size=1 face="sans-serif">&lt;user-java@ibatis.apache.org&gt;</font><font
size=3>
</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td valign=top><font size=1 face="sans-serif">RE: Lazy Load is pre loading
1-1 relationships</font></table>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=49%>
<td width=50%></table>
<br></table>
<br><font size=3><br>
<br>
</font><font size=2 color=blue face="Arial"><br>
I doubt my reply will answer your question, but this is mostly for information
purpose.</font><font size=3> <br>
 &nbsp;</font><font size=2 color=blue face="Arial"><br>
All final classes are never lazy loaded by iBATIS. This include any primitive
type, Strings and this like Integer, Double, etc...</font><font size=3>
</font><font size=2 color=blue face="Arial"><br>
This &quot;bug&quot; is probably due to the fact that cglib tries to extend
the class. If it is final, it must be loaded now.</font><font size=3> <br>
 &nbsp;</font><font size=2 color=blue face="Arial"><br>
Christian</font><font size=3> <br>
<br>
</font>
<hr><font size=2 face="Tahoma"><b>From:</b> Christopher.Mathrusse@sybase.com
[mailto:Christopher.Mathrusse@sybase.com] <b><br>
Sent:</b> Tuesday, 11 September 2007 15:12<b><br>
To:</b> user-java@ibatis.apache.org<b><br>
Subject:</b> Lazy Load is pre loading 1-1 relationships</font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
<br>
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?</font><font size=3> </font><font
size=2 face="sans-serif"><br>
<br>
Thanks...</font><font size=3> </font>
<br>

Mime
View raw message