Hi to everybody,
I'm new to JDO and Google App Engine, and I'm facing a show-stopper
problem right now.
I've got two classes, TPUser and TPContact, and TPUser has a list of
TPContacts.
Here there are the code snippets:

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true")
public class TPUser {

   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   protected Long id;

   @Persistent(mappedBy = "owner")
   private ArrayList<TPContact> contacts = new
ArrayList<TPContact>();
}


@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable = "true")
public class TPContact {

   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   protected Key id;

       @Persistent
       private TPUser owner;
}

When I try to create a new TPUser and to persist it, I get the
following exception:

javax.jdo.JDOUserException: Class "TPUser" has collection field
"contacts" and this has no mapping in the table for the element class
"TPContact" owner field "owner"
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Class "TPUser" has
collection field "contacts" and this has no mapping in the table for
the element class "TPContact" owner field "owner"

Any hint about this?

Thank you very much for your help!!

Bye CRI

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to