title: @GenericGenerator(name = "generator", strategy = "foreign") to standard JPA 2
body: <p>I would like to know if there is a standard way to convert something like that</p>
  
  <pre><code>@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "user"))
  @Id
  @GeneratedValue(generator = "generator")
  @Column(name = "id", unique = true, nullable = false)
  public Integer getId() {
      return this.id;
  }
  </code></pre>
  
  <p>to standard JPA 2 model without hibernate</p>
  
  <p>EDit : lets see both entities (i've only keep the annoted interessting portion)</p>
  
  <pre><code>@Entity
  @Table(name = "author", catalog = "test")
  public class Author implements java.io.Serializable {
  
      @GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "user"))
      @Id
      @GeneratedValue(generator = "generator")
      @Column(name = "id", unique = true, nullable = false)
      public Integer getId() {
          return this.id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      @OneToOne(fetch = FetchType.LAZY)
      @JsonBackReference
      @PrimaryKeyJoinColumn
      public User getUser() {
          return this.user;
      }
  </code></pre>
  
  <p>AND</p>
  
  <pre><code>@Entity
  @Table(name = "user", catalog = "test")
  public class User implements java.io.Serializable {
      @OneToOne(fetch = FetchType.LAZY, mappedBy = "user")
      public Author getAuthor() {
          return this.author;
      }
  </code></pre>