Hello I am wondering about the following error in Netbeans (the class is part of a ManyToMany mapping where the relationship itself has additional properties and the key is needed as the "embedded" primary key):
@Embeddable
public class MembershipKey implements IMembershipKey,Serializable {
@ManyToOne(targetEntity=User.class)
private IUser user;
@ManyToOne(targetEntity=WorkPlatform.class)
private IWorkPlatform workPlatform;
@Override
public IUser getUser() {
return this.user;
}
// some getters and setters...
}
Althogh my unit tests pass and everything seems to be ok, Netbeans shows an error where the variables user and workPlatform are red underlind (Left side: White exclamation mark in red circle) where it tells: "Basic attributes can only be of the following types: Java primitive types ... and so on"
So is it a Netbeans bug or is it possibly a real error which could lead to problems in certain situations?