Save a HashBag implementing UserCollectionType

Description

I have an Apache Collections HashBag with a @OneToMany relation.
I created a class "PersistentHashBagType" which implements "UserCollectionType" to try using type HashBag directly without transforming it to type List, but I have an exception because Hibernate do not detect the HashBag like Collection for use @OneToMany @ManyToMany or @CollectionOfElements.

Is that ok? How can I use the HashBag with Hibernate?

I referer the class in the entity of my HashBag with the annotation:

And this is the implementation of PersistentHashBagType:

Environment

Spring Boot Data JPA 2.1.1

Status

Assignee

Unassigned

Reporter

Raquel Fernández González

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Feedback Requested

2019/02/21

Feedback Requested By

Gail Badner

Affects versions

Priority

Minor
Configure