ANy particular problem?? I would design these classes like this... @PersistenceCapable(detachable = "true") public class User implements Serializable {
@PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private String email; private String firstName; private String lastName; private String password; private String passwordConf; private int status; private boolean enabled; } @PersistenceCapable(detachable = "true") public class Event implements Serializable { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key id; private Key owner; private Set<Key> participants; } Usually i prefer unowned relationship, but with new pricing you can say you can save some money by keeping a big entity(too many owned relationships). With Owned relation your User Entity will keep increasing in size with time. On Mon, Sep 19, 2011 at 1:50 AM, Alex <grumpy.bur...@gmail.com> wrote: > Hi all, > > I'm using JDO for storage in GAE and would like some advice as I'm having > trouble modelling my persistence objects. > > I have 2 classes, User and Event. A User owns an Event and can participate > in others Events. My classes look roughly like this. > > @PersistenceCapable(detachable = "true") > public class User implements Serializable { > > @PrimaryKey > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > private Key id; > private String email; > private String firstName; > private String lastName; > private String password; > private String passwordConf; > private int status; > private boolean enabled; > // owned one-to-many with event > @Persistent(mappedBy = "owner") > private List<Event> ownsEvents = new ArrayList<Event>(); > // many to many > private Set<Key> participatesInEvents = new HashSet<Key>(); > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine-java/-/ruH77bWja5wJ. > To post to this group, send email to > google-appengine-java@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- 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 google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.