title: Postgres error in batch insert : relation "hibernate_sequence" does not exist position 17
body: <p>I am performing hibernate jpa batch update and its giving me following error</p>
  
  <pre><code>2015-04-21 15:53:51,907 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-283 (HornetQ-client-global-threads-462057890)) SQL Error: 0, SQLState: 42P01
  2015-04-21 15:53:51,908 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (Thread-283 (HornetQ-client-global-threads-462057890)) ERROR: relation "my_seq_gen" does not exist
  </code></pre>
  
  <p>I am using postgres database and my ID is auto generated </p>
  
  <pre><code>  @Id
  @SequenceGenerator(name="seq-gen",sequenceName="MY_SEQ_GEN"initialValue=205, allocationSize=12)
  @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="seq-gen")
  @Column(name="\"ID\"",unique=true,nullable=false)
  private int id;
  </code></pre>
  
  <p>This is my batch insert code snippet</p>
  
  <pre><code>getEm().getTransaction().begin();
  System.out.println("transaction started--------------");
  try {   
      for (Receipt ReceiptEntity : arrReceiptEntity) {
              getEm().persist(ReceiptEntity);
      }
      getEm().getTransaction().commit();
      System.out.println("commited");
  } catch (Exception exception) {
      System.out.println("error----------------------------------------------------------------------");
      if(getEm().getTransaction().isActive())
          getEm().getTransaction().rollback();
      LOG.error(exception);
  } finally {
      getEm().flush();
      getEm().clear();
      getEm().close();
  }
  </code></pre>
  
  <p>I have added the following property in persistence.xml</p>
  
  <pre><code>         &lt;property name="hibernate.id.new_generator_mappings" value="true"/&gt;
  </code></pre>
  
  <p>Please suggest what i am doing wrong.</p>