Problem with @ElementCollection and Hibernate 5.4.29.Final

Hi all,

I have an @ElementCollection which is defined like this:

    @JoinTable(name = "PRINCIPAL_ALIAS", joinColumns = @JoinColumn(name = "PRINCIPAL_ID", referencedColumnName = "PRINCIPAL_ID"))
    @MapKeyColumn(name = "QUALIFIER")
    @Column(name = "ALIAS")
    private Map<String, String> aliases = new HashMap<>();

It seems that Hibernate doesn’t delete the referenced rows in the JoinTable anymore before deleting the rows in the entity’s table. Now tests are failing with Caused by: org.hsqldb.HsqlException: integrity constraint violation: foreign key no action; FKNRKMUYFDVBDLGQ0455HTR1AHL table: PRINCIPAL_ALIAS.
It used to work with
The items are deleted one by one, so it isn’t the bulk delete limitation.

Please create an issue in the issue tracker( with a test case( that reproduces the issue.

1 Like