Hi
I am using @CollectionOfElements inside a User class to map a list of roles.
My code is
Code:
@Entity
@Table(name="user")
public class User {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="USER_ID")
private int userId;
@CollectionOfElements
@JoinTable(
name="role",
joinColumns = @JoinColumn(name="USER_ID")
)
private List<Role> roles;
}
Inside my Role class there is another embedded object and it is mapped as
Code:
@Embeddable
@Table(name="role")
public class Role {
@Embedded
@Target(CorpEntityImpl.class)
@AssociationOverrides( {
@AssociationOverride(name="institute", joinColumns = @JoinColumn (name="ORG_ID") )
} )
private IEntity entity;
}
But I got an exception java.util.ConcurrentModificationException
Can I use embedded mapping inside an embeddable class?
Thanks In Advance
Scientia