I get the following error when i try to deploy my application on glassfish 4.1:
[class com.sample.model.Profile] uses a non-entity [class com.sample.model.ProfileEventMapping] as target entity in the relationship attribute [field events].
The tables for both entities are getting created in the database.
Profile:
@Entity
public class Profile
...
@OneToMany(mappedBy = "profile", orphanRemoval = true)
private Set<ProfileEventMapping> events = new HashSet<>();
ProfileEventMapping:
@Entity
public class ProfileEventMapping
...
@NotNull
@ManyToOne
private Profile profile;
and in my persistence.xml i choose to include all entities:
<exclude-unlisted-classes>false</exclude-unlisted-classes>
anybody an idea?