Motivated by this question, I\'ve tried to change the following:
@ManyToMany(cascade={CascadeType.REMOVE, CascadeType.MERGE})
private Set exps
I believe EclipseLink will allow you to use a concrete collection type if you set fetch to EAGER. When the relationship is LAZY EclipseLink requires to put its own lazy collection in place of the value. EclipseLink defines a lazy List, Set and Map, but no LinkedHashSet.
Note the JPA spec requires the usage of the Collection, Set, List or Map interface, no impls are allowed. If order is important, you should just use a List.
Technically it should be possible to maintain the collection implementation with LAZY collections, so please log a bug/enhancement for this.
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.