-->
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: Trouble persisting associated child classes
PostPosted: Fri Nov 11, 2005 2:28 pm 
Newbie

Joined: Fri Mar 18, 2005 9:10 am
Posts: 6
Can any on please help me with the following problem

I am having trouble persisting child classes into the database, I have one to many relationship between a class DQP and DQPRule. I have a set in DQP to hold DQPRule objects.

I created a DQP and add DQPRule to the set. when i save the DQP,
DQP gets inserted into the database, but non of the child object get persisted.

Regards,
Vinay


Hibernate version: 3

Mapping documents:

Code between

sessionFactory.openSession()
Transaction tx = session.beginTransaction();
session.saveOrUpdate(dqp);
session.flush();
session.clear();
tx.commit();
session.close():



Full stack trace of any exception that occurs: None

Name and version of the database you are using:oracle

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 11, 2005 3:59 pm 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
Check the documentation on cascade.

Not possible to give any further advice due tothe lack of supplied information(mappings etc.)


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.