title: Hibernate mapping if allocationSize exists id is 1 if not id is -48. How?
body: <p>I have an entity mapped and I want to verbosely point it to its sequence. So I have the following mapping:</p>
  
  <pre><code>@Entity
  @Table(schema = DbConstants.SCHEMA_PUBLIC, name = 
  DbConstants.PUBLIC_TABLE_TEST)
  public class TestEntity implements Serializable {
      private static final long serialVersionUID = 6284010266557287786L;
  
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "test")
      @SequenceGenerator(schema = DbConstants.SCHEMA_PUBLIC, name = "test", sequenceName = "test_id_seq")
      private Integer id;
  
  }
  </code></pre>
  
  <p>The problem is that if I don't include allocationSize in the @SequenceGenerator annotation the entities seem to have an id of something along the lines of -49 + nextval('test_id_seq'::regclass). Adding a new entity also increments the test_id_seq. I've compared the sql that hibernate uses with or without the allocationSize and it's exactly the same. </p>
  
  <p>1) How does this happen?</p>
  
  <p>2) How do the database ids end up being so different with seemingly the same sql being used by hibernate? </p>