Hi all
Here is what I've discovered, maybe it can be considered a bug.
I have @OneToMany annotation with CascadeType.ALL attribute specified. If I use EntityManager.remove on the entity everything seems to work fine. If I use Query.executeUpdate delete than the foreign key constraint is violated. The cascade doesn't work.
no it is not a bug. Read the docs about what executeUpdate do and how it works (namely by executing directly on the db and not honoring any cascade or lifecycle's).