The following query to delete a set of records, only works in some circumstances:
If you use an @ElementCollection and add some data, this query will fail. Example class:
Person.java
The following error is generated while trying to bulk delete:
As a result, this means code that formerly worked using a bulk delete, can stop working due to an @ElementCollection being added to the associated Java class.
Happy to create more detailed test case, if this is deemed to be a bug and not just me missing something! I believe this to be related to, but not the same is issue
Maven project allowing to reproduce the issue.
Does this mean when using hibernate, the only way to delete objects that use an @ElementCollection annotation must be deleted one by one. ie by doing a query and then individually deleting each object? Or is there some other documentation I have missed?