1

I am accessing oracle sequence using hibernate like

<id name="id"
        column="ID"
        type="long"
        unsaved-value="-1">
      <generator class="native">
            <param name="sequence">ID_SEQ</param>
        </generator>
    </id>

Now let's say if I want to find current value of the sequence or next value from the sequence, how can i do that using hibernate?

Rachel
  • 100,387
  • 116
  • 269
  • 365
  • possible duplicate of [Get from oracle sequence with hibernate](http://stackoverflow.com/questions/4843490/get-from-oracle-sequence-with-hibernate) – GolezTrol Jul 03 '12 at 15:34
  • and of http://stackoverflow.com/questions/6386888/get-next-sequence-value-from-database-using-hibernate – GolezTrol Jul 03 '12 at 15:34
  • Related: http://stackoverflow.com/questions/7171626/hibernate-with-oracle-sequence-doesnt-use-it – GolezTrol Jul 03 '12 at 15:36
  • Oh wait, it seems you can! http://stackoverflow.com/questions/5346147/hibernate-oracle-sequence-produces-large-gap – GolezTrol Jul 03 '12 at 15:37
  • B.t.w., those are the first 4 hits on Google for `hybernate oracle get sequence` – GolezTrol Jul 03 '12 at 15:38

0 Answers0