[appengine-java] How to model this kind of relationship? (Trackbacks)

2011-10-05 Thread Thiago Rossi
Hi! I'm studying Computer Science and I am italian. Actually I'm new to the NoSQL world, have a little experience with Google App Engine (DataStore/BigTable) and MongoDB… I need to create a social network website for the university. Well, only the data model scheme. A little one, of course. Nothin

Re: [appengine-java] JDO: how to add a child without the collection

2011-07-04 Thread Thiago Rossi
Thanks! Well, in JDO you can do: Query q = pm.newQuery("select id from " + MyClass.class.getName()); I think __key__ can work too, but not sure. On 4 July 2011 19:09, jMotta wrote: > Thiago, > > Nowadays the amount of documentation and features of both interfaces are > almost equals. Java has

Re: [appengine-java] Re: JDO: how to add a child without the collection

2011-07-04 Thread Thiago Rossi
True. I had forgotten about the unowned relationships, but I think again I will need to retrieve the collections in order to add the new Key, right? Of course it's much better to retrieve a collection of keys than a collection of entities. And maybe making the relationship from the LoginHistory to

Re: [appengine-java] How to update a record in Google Apps data store

2011-07-04 Thread Thiago Rossi
You just need to retrieve it, change it and close the persistence manager. No makePersistent method needed. For example: public void updateEmployeeTitle(User user, String newTitle) { PersistenceManager pm = PMF.get().getPersistenceManager(); try { Employee e = pm.getObjectById(