lisandrodc
View profile
More options Dec 29, 11:26 am
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" 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.