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:
Spring Boot Data JPA 2.1.1