title: Duplicate key value on saving child entities
body: <p>When i'm trying to save an entitiy (Role) of ManyToMany relation, id of child entity is generated incorrectly, and i'm receiving DataIntegrityViolationException.</p>
  <p>Part of saving parent entity with child:</p>
  <pre><code>public Organization create(Organization organization) {
          Organization created = save(organization);
          Role role = new Role();
          role.setCode(&quot;test&quot;);
          created.getRoles().add(role);
          return save(created);
      }
  </code></pre>
  <p>Hibernate debug and exception:</p>
  <pre><code>Hibernate: insert into organization (company_code, full_legal_name, id) values (?, ?, ?)
  Hibernate: insert into role (code, description, read_only, reserved) values (?, ?, ?, ?)
  2021-12-23 10:34:50.459  WARN 13464 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 0, SQLState: 23505
  2021-12-23 10:34:50.459 ERROR 13464 --- [           main] o.h.engine.jdbc.spi.SqlExceptionHelper   : ERROR: duplicate key value violates unique constraint &quot;role_pkey&quot;
    Detail: Key (id)=(15) already exists.
  </code></pre>
  <p>Parent entity:</p>
  <pre><code>@Entity        
  public class Organization {
  
      @Id
      Long id;
  
      @ManyToMany(cascade = {CascadeType.ALL}, fetch= FetchType.EAGER)
      @JoinTable(name = &quot;organization_role&quot;,
              joinColumns = @JoinColumn(name = &quot;organization_id&quot;),
              inverseJoinColumns = @JoinColumn(name = &quot;role_id&quot;))
      Set&lt;Role&gt; roles = new HashSet&lt;&gt;();
      }
  </code></pre>
  <p>Role entity:</p>
  <pre><code>@Entity
  public class Role implements Serializable {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Integer id;
  }
  </code></pre>
  <p>Liquibase tables:
  Role:</p>
  <pre><code>CREATE TABLE role
  (
      id          SERIAL                                    NOT NULL,
      code        VARCHAR(32)                               NOT NULL,
      CONSTRAINT role_pkey PRIMARY KEY (id)
  );
  </code></pre>
  <p>Organization:</p>
  <pre><code>CREATE TABLE organization (
      id bigint NOT NULL,
      CONSTRAINT organization_pkey PRIMARY KEY (id)
  );
  </code></pre>
  <p>Organization-Role:</p>
  <pre><code>CREATE TABLE organization_role (
      role_id INTEGER  NOT NULL,
      organization_id BIGINT NOT NULL,
      CONSTRAINT fk_organization_role_role FOREIGN KEY (role_id) REFERENCES role(id),
      CONSTRAINT fk_organization_role_organization FOREIGN KEY (organization_id) REFERENCES organization(id),
      CONSTRAINT user_organization_pkey PRIMARY KEY (role_id, organization_id)
  );
  </code></pre>