File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
RabbitMQ in Depth
this week in the
Object Relational Mapping
Using Oracle squence in Hibernate
Joined: May 15, 2012
Dec 26, 2012 10:29:55
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:
<id name="id" type="java.lang.Integer"> <column name="ID_PRODUCT" /> <generator class="sequence-identity" > <param name="sequence">PRODUCT_ID_SEQ</param> </generator> </id>
I agree. Here's the link:
subject: Using Oracle squence in Hibernate
inverse=true in many-to-many doubt
sequence generator with mysql
Many to Many Mapping: Link table not getting updated
Hibernate : Could not parse mapping document from resource
Cannot generate a non-primary-key field in hibernate
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015