Hi! Prashant/Hariharan. The problem was that I don´t have the
annotation in the collection:
@Persistent(mappedBy = "torneo", defaultFetchGroup = "true")
private List<Equipo> equiposTorneo;
The defaultFetchGroup = "true" is critical and in the documentation of
google it is not...
I did not have to detach collections fields...
Regards
On 12 jul, 12:43, Hariharan Anantharaman
<[email protected]> wrote:
> Hi Lisan,
> In the Torneo class, i am not seeing "mappedBy" attribute for @persistent
> tage for field
>
> private List<Equipo> equiposTorneo;
>
> That is required to make this a owned one-many collection. Only then it
> might be possible to get collection of Equipo when retrieving Torneo .
>
> Thanks
> Hari
>
> 2010/7/12 Prashant <[email protected]>
>
> > you need to create a new method in Torneo which will detach collections
> > field. Now you just need to call this function with PersistenceManager as
> > argument.
>
> > public Torneo devolverTorneo(Long idTorneo) {
>
> > Torneo b = pm.getObjectById(Torneo.class, idTorneo);
>
> > b.detachFields(pm);
> > b=pm.detachCopy(b);
> > pm.close();
>
> > return b;
> > //The method return the object for update
>
> > }
>
> > public class Torneo implements Serializable{
> > ....
>
> > public void detachFields(PersistenceManager pm) {
>
> > pm.detachCopyAll(equiposTorneo);
>
> > }
>
> > ....
> > }
>
> > --
> > Prashant
> >www.claymus.com
>
> > --
> > 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]<google-appengine-java%[email protected]>
> > .
> > 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 [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.