my dog learned polymorphism
The moose likes Object Relational Mapping and the fly likes Using Oracle squence in Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Using Oracle squence in Hibernate" Watch "Using Oracle squence in Hibernate" New topic
Author

Using Oracle squence in Hibernate

gi tos
Greenhorn

Joined: May 15, 2012
Posts: 12
Hello,

I want to use an Oracle sequence with hibernate.

the problem is that the sequence will not be use as an ID. But to update a field when some conditions are available.

so I want to do something like this:

update MY_TABLE set NUM_VAL = select MY_SEQ.nextval

I found many examples but all of theme are talking about a sequence that is user as an ID:



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Oracle squence in Hibernate
 
Similar Threads
inverse=true in many-to-many doubt
Cannot generate a non-primary-key field in hibernate
Hibernate : Could not parse mapping document from resource
Many to Many Mapping: Link table not getting updated
sequence generator with mysql