---------- Forwarded message ----------
From: Bruno Sandivilli <bruno.sandivi...@gmail.com>
Date: 2011/10/7
Subject: Re: One-To-Many RElations Serialization
To: google-web-tool...@googlegroups.com


PersistenceManager pm = PMF.get().getPersistenceManager();
javax.jdo.Query query = (javax.jdo.Query) pm.newQuery(Objetos.class);
 query.setFilter("name == nameParam");
query.declareParameters("String nameParam");
 List<MyInnerList> listaMyInnerList = new ArrayList<MyInnerList>();
List<MyMain> listaMyMainList  = (List<MyMain>) query.execute(nameParam);
 if(listaMyMainList .size() > 0)
{
listaMyInnerList.addAll(listaMyMainList.get(0).getMyInnerList());
 }
return new ArrayList(listaMyInnerList);
                        or
                       return listaMyInnerList;
it gives the same error of Type 'org.datanucleus.sco.backed.ArrayList'

anyone?

2011/10/7 Bruno Sandivilli <bruno.sandivi...@gmail.com>

> Thanks Buddy!
> But if i'm not using Hibernate? I'm using pure GWT, do i have to use the
> <filter> in web.xml? How can i achieve this? Thanks
>
>
> 2011/10/7 Juan Pablo Gardella <gardellajuanpa...@gmail.com>
>
>> You can see the same problem but with hibernate 
>> here<http://code.google.com/intl/es/webtoolkit/articles/using_gwt_with_hibernate.html>.
>> In this page show some strategies to resolve the problem. In my case I don't
>> adopt this strategies. I do a filter. In Pro Web 
>> 2.0<http://books.google.com/books?id=OG816JSZYVcC&pg=PA159&lpg=PA159&dq=gwt+hibernate+filter&source=bl&ots=BM1JxFq0h9&sig=gTKoh1ZBWs26d5vjRi-7CP4fo20&hl=es&ei=R0OPTu_4GZC1hAfXmc32Dw&sa=X&oi=book_result&ct=result&resnum=7&ved=0CF0Q6AEwBg#v=onepage&q=gwt%20hibernate%20filter&f=false>explain
>>  the use of a
>> *filter*. A class that, in your case, for example convert
>> org.datanucleus.sco.backed.List in java.util.List. This filter intercept the
>> classes before send to client. Here
>> <https://bitbucket.org/gardellajuanpablo/gwt-sample/src/8aba86d82778/src/main/java/com/foo/server/rpc/hibernate/HibernateFilter.java>you
>> have an example of a Hibernate filter compatible with GWT 2.4.0 and how
>> integrate in a sample project.
>>
>> Juan
>>
>>
>>
>> 2011/10/7 Bruno Sandivilli <bruno.sandivi...@gmail.com>
>>
>>> How can i serializa this List<MyClass> ?
>>>
>>>
>>> 2011/10/7 Juan Pablo Gardella <gardellajuanpa...@gmail.com>
>>>
>>>> What's your question?
>>>>
>>>> 2011/10/6 Bruno Sandivilli <bruno.sandivi...@gmail.com>
>>>>
>>>>>  I'm getting this error when my RPC returns a list of a custom object:
>>>>> Type 'org.datanucleus.sco.backed.List' was not included in the set of
>>>>> types which can be serialized by this SerializationPolicy or its Class
>>>>> object could not be loaded. For security purposes, this type will not be
>>>>> serialized.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Google Web Toolkit" group.
>>>>> To post to this group, send email to
>>>>> google-web-tool...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google Web Toolkit" group.
>>>> To post to this group, send email to
>>>> google-web-tool...@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Web Toolkit" group.
>>> To post to this group, send email to google-web-tool...@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to
>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to