Why cannot a JPA mapping attribute be a LinkedHashset?

后端 未结 2 729
[愿得一人]
[愿得一人] 2021-01-24 09:27

Motivated by this question, I\'ve tried to change the following:

 @ManyToMany(cascade={CascadeType.REMOVE, CascadeType.MERGE})
private Set exps         


        
2条回答
  •  庸人自扰
    2021-01-24 10:20

    Only the standard interfaces types are allowed as attribute types in JPA. Why are you changing the type of the attribute? With the original definition the underlying collection is still your custom type.

提交回复
热议问题