openjpa « Cascade « JPA Q&A





1. Cascade persistence fails to generate primary key for a new entity, why?    stackoverflow.com

This is the code:

@Entity
public class Dept {
  @Id 
  @GeneratedValue(strategy = GenerationType.AUTO)
  private Integer id;
  @OneToMany(
    mappedBy = "dept",
    cascade = ...