Hello,
i'm tring Java on GAE and using JDO to map my beans. I attended at
http://code.google.com/appengine/docs/java/datastore/relationships.html#Owned_One_to_Many_Relationships
to set beans relationships, but, always occurs follow error

Error in meta-data for com.bean.Town.id: Cannot have a java.lang.Long
primary key and be a child object (owning field is
com.bean.Province.town).

My beans are

**** Province.java ****
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Province {

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

        @Persistent
        private String name;

        @Persistent(mappedBy = "province")
        private Town town;

**** Town.java ****
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Town {

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

        @Persistent
        private Province province;

Example in link uses class like mine.

How i can solve?
how i can map relationships?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to