Hi! I have a problem with the persistence of an existing object
"Torneo" (with a empty collection of objects "Equipo").
When I add elements to the collection and want to persist,
sometimes persist and sometimes not persist in the
datastore(Restarting the server of the application). The code of
example:
public void agregarEquipoConTorneo(Torneo unTorneo, Equipo  unEquipo)
{
                /*add Equipo with a existing "Torneo" in the
               datastore, the  "unTorneo"(param) class obtain with:
Torneo b =
               pm.getObjectById(model.Torneo.class, idTorneo);*/
                Transaction tx = pm.currentTransaction();
                try {
                        tx.begin();
                        unTorneo.agregarEquipo(unEquipo);
                        //add unEquipo to collection "equipos"
                        pm.makePersistentAll(unTorneo);
                        tx.commit();
System.out.println("persistioTorneoConEquipo");
                } finally {
                         pm.close();
                        if (tx.isActive()) {
                                tx.rollback();
                        }
                }
Does it design someone of what this one happening?
Thanks!
Regards
Lisandro

-- 
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-j...@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.

Reply via email to