title: Hibernate sequence on oracle, @GeneratedValue(strategy = GenerationType.AUTO)
body: <p>I'm usign @GeneratedValue(strategy = GenerationType.AUTO) to generate the ID on my entity.</p>
  
  <p>I don't now how it works, but on my child table, generates ID values, that follow the parent sequence.</p>
  
  <pre><code>//parent table
  @Entity
  @Table (name = "parent")
  public class Parent {
  
      @Id
      @GeneratedValue (strategy = GenerationType.AUTO)
      @Column (name = "id")
      private long id;
  
  
      @OneToMany (cascade = {CascadeType.ALL}, fetch = FetchType.LAZY)
      @JoinColumn (name = "parentId")
      @ForeignKey (name = "FKparent")
      private List&lt;child&gt; child;
  
  }
  
  //child table
  @Entity
  @Table (name = "child")
  public class Child {
  
      @Id
      @GeneratedValue (strategy = GenerationType.AUTO)
      @Column (name = "id")
      private long id;
  }
  </code></pre>
  
  <p>The inserted ID values on parent, updates the sequence. 
  The inserted ID values on child, updates the sequence. 
  On the next insert of parent, the sequence...  uses values updated by child insertions...</p>
  
  <p>This Annotations, aren't creating two sequences, only one. Is this  correct/expected?</p>
  
  <p>I inserted my entities with my DAO service only using <code>entityManager.persist(parent);</code></p>