title: Generate unpredictable random @Id for Entity
body: <p>I have the following code. Because the <code>@Id</code> value is generated sequentially in my <code>MariaDB</code>, it's not safe: I need to expose it in the clients. That's why I want a unpredictable random <code>@Id</code>. How should I change the code?</p>
  
  <pre><code>@Entity
  public class Item implements Serializable {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id; // Automatic generated value
  
      // other fields, getters, setters &amp; constructors
  }
  </code></pre>