Hello,
I have a group of objects persisted using Hibernate. I have a Client object that can have a list of Contacts, and also is linked with a class Address.
Now before the client object was set up in a way that once loaded, all it's Contacts where also loaded.
I did not want this since it was effecting the performance of the web application. Therefore I set the XDoclet command as follows for the Client object.
Code:
/* . . .
* @hibernate.list inverse="true" cascade="all" lazy="true"
* @hibernate.collection-key column="client"
* @hibernate.collection-index column="id"
* @hibernate.collection-one-to-many class="com.my.comon.Contact"
*/
public List<Contact> getContacts(){
. . .
}
Now as you can notice, I have set the field lazy="true" however the Contact objects are still loaded! I know this because I can see the generated Sql. however this field lazy="true" is working fine on another list of objects related with Client.
does anyone has any ideas on what I should check?
reagrds,
Sim085