-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate 3.0 to 3.2; parent does not retreive child objects
PostPosted: Wed Nov 29, 2006 4:35 am 
Newbie

Joined: Wed Sep 07, 2005 8:22 am
Posts: 14
Problem:

I've upgraded from Hibernate 3.0 to 3.2.
I have an object that has a list of of other objects (java.util.list).

The tagRecords are persisted in the DB, but when I retreive the parent object it does not contain any children (tag does not have any tagRecords).

Can anyone suggest why?

Can someone please point me in the direction of the migration docuement?

Thanks
Jeff Porter

Hibernate version:
3.2

Mapping documents:
Xdoclet used on TAG class...

/**
* @hibernate.list cascade="all-delete-orphan" lazy="false"
* @hibernate.collection-one-to-many class="com.kbtflawt.model.savi.TagRecord"
* @hibernate.collection-index column="tagrecord_index"
* @hibernate.collection-key column="fk_tagrecord_link"
*/
public List getListOfTagRecords() {
return listOfTagRecords;
}

Xdoclet used on TAGRecord class...
/**
* @hibernate.many-to-one cascade="none" column="fk_tagrecord_link"
*/
public Tag getTag() {
return tag;
}


Code between sessionFactory.openSession() and session.close():

Code:
   hsession = factory.openSession();
   trans =  hsession.beginTransaction();
   trans.begin();
         
   tag.addRecord(tagRecord);// this is a list.
   hsession.saveOrUpdate(tag);
         
   trans.commit();
      
   hsession.close();


Name and version of the database you are using:
MySQL 4.2

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
How do I turn this on?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 4:49 am 
Newbie

Joined: Wed Sep 07, 2005 8:22 am
Posts: 14
found the migration guide (I think)

http://www.hibernate.org/250.html

Jeff Porter


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.