title: Spring boot UUID primary key entity doesn't show right id after created
body: <p>So I have entity with UUID as primary key. After I create the entity in my service, the response return wrong id.</p>
  <p>My Role entity</p>
  <pre><code>package denny.study.stock.entity
  
  import denny.study.stock.util.converter.JsonToMapConverter
  import org.hibernate.annotations.CreationTimestamp
  import org.hibernate.annotations.GenericGenerator
  import org.hibernate.annotations.Type
  import org.hibernate.annotations.UpdateTimestamp
  import java.util.*
  import javax.persistence.*
  
  @Entity
  @Table(name = &quot;roles&quot;)
  class Role {
  
      @Id
      @GeneratedValue(generator = &quot;uuid2&quot;)
      @GenericGenerator(name = &quot;uuid2&quot;, strategy = &quot;uuid2&quot;)
      @Column(name = &quot;id&quot;, columnDefinition = &quot;CHAR(36)&quot;)
      @Type(type = &quot;uuid-char&quot;)
      var id: UUID = UUID.randomUUID()
  
      @Column
      var name: String = &quot;&quot;
  
      @Column
      var slug: String = &quot;&quot;
  
      @Column
      @Convert(converter = JsonToMapConverter::class)
      var permissions: MutableMap&lt;String, Boolean&gt;? = null
  
      @Column(name = &quot;created_at&quot;)
      @CreationTimestamp
      var createdAt: Date = Date()
  
      @Column(name = &quot;updated_at&quot;)
      @UpdateTimestamp
      var updatedAt: Date? = null
  
  }
  </code></pre>
  <p>My store method in role service</p>
  <pre><code>    override fun store(roleRequest: RoleRequest): RoleResponse {
          val role = Role().apply {
              name = roleRequest.name
              slug = roleRequest.slug
              permissions = roleRequest.permissions
          }
  
          roleRepository.save(role)
  
          return RoleResponse(role)
      }
  </code></pre>
  <p>My Role response</p>
  <pre><code>package denny.study.stock.model.response.role
  
  import denny.study.stock.entity.Role
  
  class RoleResponse(role: Role) {
  
      var id = role.id
  
      var name = role.name
  
      var slug = role.slug
  
      var permissions = role.permissions
  
  }
  </code></pre>
  <p>the json response return id &quot;f95bddf6-eb22-49bb-b8e6-5eb819603fa9&quot;</p>
  <pre><code>{
      &quot;code&quot;: 200,
      &quot;status&quot;: &quot;OK&quot;,
      &quot;data&quot;: {
          &quot;id&quot;: &quot;f95bddf6-eb22-49bb-b8e6-5eb819603fa9&quot;,
          &quot;name&quot;: &quot;Role 1&quot;,
          &quot;slug&quot;: &quot;role-1&quot;,
          &quot;permissions&quot;: {
              &quot;asd&quot;: true,
              &quot;dsa&quot;: false
          }
      }
  }
  </code></pre>
  <p>while in DB it stored as &quot;87596692-7ee9-4ecb-a425-3b1372d901f4&quot;. Do you know why It return the wrong id? Thank you!</p>