What is the best way to set an dbRef in entity? I would not save a relation as embedded object in a collection for example.
public class Order {
@Id
@GeneratedValue
public String id;
private List<Article> articles;
}
public class Article {
@Id
@GeneratedValue
public String id;
private String name;
}