jpa should I map relations on bot sides code example
Example 1: jpa mapping
@Id
@GeneratedValue(Strategy = GenerationType.AUTO)
private Integer id;
private void setId(Integer i) { id = i; }
public Integer getId() { return id; }
Example 2: jpa mapping
@Id
@GeneratedValue(Strategy = GenerationType.IDENTITY)
private Integer id;