-->
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.  [ 4 posts ] 
Author Message
 Post subject: Mapping id field to oracle function
PostPosted: Tue Jan 31, 2006 8:16 am 
Newbie

Joined: Fri Dec 09, 2005 6:17 am
Posts: 7
Hibernate version:3.1beta8

I'm trying to map an id field to an oracle function. Unfortunately I do not have access to the sequence that this function wraps up. Can this be done using annotations?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 4:54 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
@Type i think

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 02, 2006 7:11 am 
Newbie

Joined: Fri Dec 09, 2005 6:17 am
Posts: 7
Well I haven't been able to get hibernate to map to a function, however, for anyone having the same problem I did find a solution. The answer was to create a new package on oracle with a function called nextval. This in turn called the original function so that the correct id was retrieved. Of course to hibernate it just looks like a sequence so it's easy to map to in the usual way.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 08, 2006 1:32 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Oh OK, so an IdentifierGenerator implementation would have been the correct solution.

_________________
Emmanuel


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