In this example it looks like you replace existing list (r.seznamNemovitosti) with completely new one. But what if there is already existing list?
Another question. In JDO documentation it's told you don't need to make persistent all members of the object separately - all of them should be stored when owning object is stored (http://db.apache.org/ jdo/pm.html): When an object is persisted, if it has any other objects referenced from that object they also will be made persistent. This is referred to as persistence-by-reachability. The main benefit of this is that if you have an object graph to persist, then you don't need to call makePersistent() on all objects, instead just using one that can be used to find all of the others. Doesn't it apply to GAE? On Jan 27, 5:08 am, prabu <[email protected]> wrote: > PersistenceManager pm = PMF.get().getPersistenceManager(); > Transaction tx = pm.currentTransaction(); > Realitka r = new Realitka (); > tx.begin(); > Nemovitost n = new Nemovitost (req.getParameter("value") > List<Nemovitost> nlist = new ArrayList<Nemovitost>(); > nlist.add(n); > r.setSeznamNemovitosti(nlist); > try { > pm.makePersistent(r); > > } finally { > tx.commit(); > pm.close(); > } -- 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.
