-->
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: M-1 unidirectional cascade failure.
PostPosted: Wed Nov 24, 2004 11:01 am 
Newbie

Joined: Wed Nov 24, 2004 10:15 am
Posts: 7
Hibernate version:2.1.7b

Mapping documents:
/**
* public access for SL Contact ID
* This method dereferences an instance of SLContact.
* @hibernate.many-to-one column="SL_Contact_ID" unique="true" cascade="all" not-null="true"
* @return The related instance of SLContact.
*/
public SLContact getSLContact() {
return slContact;
}


Code between sessionFactory.openSession() and session.close():
SLContact c = new SLContact();
SHStakeholder sh = new SHStakeholder();
sh.setSHQuantumNbr("TESTQUANT");
sh.setSLContact(c);
c.setFirstname("Craig");
c.setLastname("Main");
c.setMiddlename("Richard");
c.setAccount("PPS");
c.setSeccodeid("PPS");
Object om = session.save(sh);
session.flush();



Name and version of the database you are using:SQL Server 2000

My problem is simple.
Given a table with two columns.
ID int identifier
SL_CONTACT_ID varchar(20)

I need the child to update before the parent.
I have read chapter 16. This is different, the relationship is uni-directional.
I have searched some of 3000 forum messages on the topic, but have not found a solution.

Some help would be greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 2:24 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
not enough info, read red box

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


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.