Despite using "CascadeType.ALL" the following code creates foreign key
"ON UPDATE NO ACTION ON DELETE NO ACTION" instead of expected "ON
UPDATE CASCADE ON DELETE CASCADE":
@Entity
public class User extends Model {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "author")
public List<Post> posts;
// ...
}
@Entity
public class Post extends Model {
@ManyToOne
public User author;
// ...
}
play test # ->
http://localhost:9000/@tests
This happens both for the default db=mem and PostgreSQL 9.1.