Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manage Hibernate Generator Sequence

I need help related to Hibernate Generator Sequence.

Is it possible to manage with Hibernate java class a sequence defined in DB (Oracle) mapped by hibernate hbm file ?

I mean, update the sequence manually from java mapped class to generate a composite sequence.

Thanks !

like image 348
Ricardo García Avatar asked Jan 24 '26 14:01

Ricardo García


1 Answers

To access a sequence via Hibernate you can use a named query. For example, consider following links: define named query in orm.xml with jpa and hibernate and http://www.coderanch.com/t/218082/ORM/java/Getting-sequence-hibernate .

like image 77
Olaf Avatar answered Jan 26 '26 07:01

Olaf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!