title: Hibernate having issues with sequence object - unable to call next val
body: <p>I am using hibernate entity - and sequence generator with it.</p>
  
  <p>My database is Oracle 12c. </p>
  
  <p>In my sequence generator - it fetches value which is already present in table. </p>
  
  <p>I tried looking out for issue  -  found one simmilar thread 
  <a href="https://stackoverflow.com/questions/38578770/hibernate-sequence-nextval-resolved-but-not-used-oracle">Hibernate sequence nextVal resolved but not used (Oracle)</a></p>
  
  <p>But still it did not help .  The issue am facing is - it works some times and it does not work some times </p>
  
  <p>Below is my code snippet - </p>
  
  <pre><code>@Entity
  @Table(name="TABLE_NAME", schema = "SCHEMA")
  @SequenceGenerator(name="TABLE_ID_SEQ_GEN", sequenceName="SCHEMA.TABLE_ID_SEQ",allocationSize=1)
  public class ImportTransactionDataEntity {
  
      @Id
      @Column(name="TABLE_ID",unique=true,nullable=false)
      @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="TABLE_ID_SEQ_GEN" )
      private int IDColumnPk;
  </code></pre>
  
  <p>ANy help is appreciated , thank you :) </p>