title: Get the last inserted record's primary key
body: <p>I have Entity class named Driver, My primary key generation mechanism is </p>
  
  <pre><code> @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   private Long id; 
  </code></pre>
  
  <p>Now I need to add "driverCode" attribute to the Driver, It should be unique value with prefix (dri1, dri2), "dri" is the prefix value , key should be the primary key value of the Driver, I want to add the driverCode when the driver is created at first time, To do that I need to get the last inserted Driver's primary key, add one ,and concatenate with the prefix, Can any one tell how to get the last inserted record's primary key before insert a new record, Is there any easy way to this?, </p>
  
  <p>Thank you in advance,</p>