-->
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.  [ 1 post ] 
Author Message
 Post subject: saveORUpdate
PostPosted: Thu Aug 03, 2006 2:26 am 
Newbie

Joined: Sat Jul 22, 2006 1:47 pm
Posts: 11
Hi,


I have learnt that Hibernate uses "unsaved-value" property of "id" element to determine wether to insert or update a row.

How can we make Hibernate use a different attribute rather than id to determine wether to insert or update a row.

For example my data class is

public Customer
{

private String custRef = "";
private String saveMode= "";
private String address= "";

}

Database table has two columns (CUST_REF and ADDRESS).

I need hibernate to use the value of saveMode attribute of Customer class to determin wether to insert or update.

Can we do this with Hibernate.

Thanking You,
Chamal.


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

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.