Defining an object with an @ElementCollection prevents bulk delete

Description

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.

Environment

None

Activity

Show:
Jacob Rhode
September 2, 2010, 11:48 PM
Edited

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

PascalP
September 3, 2010, 12:45 AM

Maven project allowing to reproduce the issue.

Steve Ebersole
September 3, 2010, 5:01 AM

JacobR
September 3, 2010, 6:21 AM

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?

Rejected

Assignee

Unassigned

Reporter

Jacob Rhode

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major