Yes was the issue. Thank you.  Aidan

El 16 de abril de 2012 15:27, Aidan O'Kelly <aida...@gmail.com> escribió:

> You'll probably need:
> with("parents", "parents.childs")
>
> getChilds() is not a method on your Callback object..
>
> 2012/4/16 Daniel Mauricio Patino León <ceo.lion....@gmail.com>
>
>> Iam stuck here! any help would be appreciated. (sorry for duplicate the
>> post :
>> http://stackoverflow.com/questions/10180282/requestfactory-and-onetomany-association
>>  )
>>
>> My case is that i have a @OneToMany association on my module.
>>
>>      class Parent{
>>         @OneToMany(
>>            mappedBy="parent"
>>         )
>>         return List<Child> getChilds();
>>      }
>>
>>      class Child{
>>        @ManyToOne
>>        return Parent getParent();
>>      }
>>
>> The in the client side i want get get the whole object map.
>>
>> i do this (AsyncDataProvider with a DataGrid as display):
>>
>>      requestContext.getParents().with("childs").fire(new
>> Receiver<CallbackProxy>() {
>>  @Override
>> public void onSuccess(CallbackProxy response) {
>> display.setRowData(range.getStart(),response.getParents());
>>  updateRowCount(response.getCount().intValue(), true);
>> }
>> });
>>
>> My DAO its just querying the whole map.
>>
>>      Criteria criteria = session.createCriteria(Parent.class);
>>      criteria.setFetchMode("childs", FetchMode.JOIN);
>>      criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
>>      /* we got all the map here on the server side */
>>
>>      Callback callback = new Callback();
>>      callback.setCount(count);
>>      callback.setParents(criteria.list());
>>
>>      return callback;
>>
>> But i cant get the childs. The list of them are null. Please note iam
>> using with("childs")
>>
>> Thank you.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/google-web-toolkit/-/0J0QrK3tolYJ.
>> To post to this group, send email to google-web-toolkit@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-toolkit@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.
>



-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

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

Reply via email to