-->
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.  [ 5 posts ] 
Author Message
 Post subject: id of 0
PostPosted: Fri Aug 04, 2006 1:54 pm 
Beginner
Beginner

Joined: Mon Jun 19, 2006 9:21 pm
Posts: 25
So is there a way to tell hibernate, when using the criteria queries, that an id of 0 is allowed? Currently I get a TransientObjectException because I believe hiberante thinks that it's not a real entity in the db (understandably).


Top
 Profile  
 
 Post subject: could you change the unsaved value setting?
PostPosted: Fri Aug 04, 2006 3:12 pm 
Beginner
Beginner

Joined: Thu Dec 09, 2004 7:04 pm
Posts: 26
Location: Denver, CO
If the unsaved value where, say -1, then 0 would be a non-transient value.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 5:21 pm 
Beginner
Beginner

Joined: Mon Jun 19, 2006 9:21 pm
Posts: 25
Ok, how could I tell hibernate that? Because it's only for this one table (not sure why it was setup that way, but it was).


Top
 Profile  
 
 Post subject: Section 5.1.4
PostPosted: Fri Aug 04, 2006 7:56 pm 
Beginner
Beginner

Joined: Thu Dec 09, 2004 7:04 pm
Posts: 26
Location: Denver, CO
http://www.hibernate.org/hib_docs/reference/en/html/mapping.html


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 04, 2006 8:00 pm 
Beginner
Beginner

Joined: Mon Jun 19, 2006 9:21 pm
Posts: 25
Great. Thanks jliptak. Appreciate it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.