I have 3 class with relation:
- Member 1-n Tracker
- Link 1-n Tracker
with owned one-to-many bidirectional relationship
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Member {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent(mappedBy = "member")
private List<Tracker> trackers;
}
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Link {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent(mappedBy = "link")
private List<Tracker> trackers;
}
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Tracker {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private Member member;
@Persistent
private Link link;
}
I create a new tracker:
member = new Member();
member.name = "blah";
link = new Link();
link.url = "http://blahblah.blah";
tracker = new Tracker();
tracker.setMember(member);
tracker.setLink(link);
pm.makePersistent(tracker);//error
it throws
The class "The class "zodpob.model.Tracker" is not persistable. This
means that it either hasnt been enhanced, or that the enhanced version
of the file is not in the CLASSPATH (or is hidden by an unenhanced
version), or the Meta-Data/annotations for the class are not found."
is not persistable. This means that it either hasnt been enhanced, or
that the enhanced version of the file is not in the CLASSPATH (or is
hidden by an unenhanced version), or the Meta-Data for the class is
not found.
what is "enhanced" mean?
if i persistent a class with no relation, it's work well