title: Why is the ids in my jpa hibernate postgres database skipping id values?
body: <p>I have these tables that are autogenerated by JPA and Hibernate on startup with these spring configuration.</p>
  
  <p>This is my application.yml config:</p>
  
  <pre><code>spring:
    datasource:
      url: "jdbc:postgresql://postgres-cinema:5432/postgres"
      username: "postgres"
      password: ""
      driver-class-name: "org.postgresql.Driver"
    jpa:
      database: "postgresql"
      hibernate:
        ddl-auto: "update"
  </code></pre>
  
  <p>These are my Entity classes:</p>
  
  <pre><code>@Entity
  class Cinema(
  
      @get:Id @get:GeneratedValue
      var id: Long? = null,
  
      @get:NotBlank @get:Size(max = 128)
      var name: String,
  
      @get:NotBlank @get:Size(max = 128)
      var location: String? = null,
  
      @get:OneToMany(mappedBy = "cinema", cascade = [CascadeType.ALL], fetch = FetchType.EAGER)
      var rooms: MutableSet&lt;Room&gt; = mutableSetOf()
  )
  
  @Entity
  class Room(
  
      @get:Id @get:GeneratedValue
      var id: Long? = null,
  
      @get:NotBlank @get:Size(max = 128)
      var name: String,
  
      @get:ElementCollection
      @get:NotNull
      var seats: MutableSet&lt;String&gt;,
  
      @get:ManyToOne(fetch = FetchType.EAGER)
      @get:JoinColumn(name = "cinema_id")
      var cinema: Cinema? = null
  )
  </code></pre>
  
  <p>When i'm creating a new Cinema it gets the id of 1
  Next i'm creating a new Room, and it gets the id of 2.</p>
  
  <p>Am i doing something rong with the entity tables? and aren't these supposed to be independent table with their own ids?</p>