-->
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: Hibernate Id generation disabled
PostPosted: Tue Dec 28, 2004 7:09 am 
Newbie

Joined: Sun Dec 12, 2004 5:13 am
Posts: 10
Location: Vicenza,Italy
Hibernate version: 2.1.7

Hi all!
I have a Database that doesn't use genrators/hilo/sequence or other id generator.
I use assigned value to id to write it.
I have create a trigger that do this for me and i don't want to set manually the id when i call save(obj) function ( I try to pass null value, but hibernate does not accept it! ).

Any suggestion??

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 28, 2004 7:15 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
maybe implementing your own identifier generator

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 28, 2004 7:17 am 
Newbie

Joined: Sun Dec 12, 2004 5:13 am
Posts: 10
Location: Vicenza,Italy
I'll suppose.....
Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 28, 2004 8:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
in Hibernate3 we now have support for id's generated by a trigger - it requires you to identify key columns to allow hibernate to get the actual id assigned to the inserted row.

Check out SelectGenerator in H3

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 28, 2004 8:53 am 
Newbie

Joined: Sun Dec 12, 2004 5:13 am
Posts: 10
Location: Vicenza,Italy
Perfect!
Thanks!


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.