Hello,

I've started to use RequestFactory in my project, but I have following
problem.

I have  Classes

class Professor
{
@ManyToMany(...)
 List<Subject> subjects;
///setters getters etc
}

I  have created all needed architecture (Proxys, Requests etc)

In my application I do :
1) I am fetching List of all Subjects  from the database.
 final SubjectRequest request = requestFactory.subjectRequest();
  request.findAll().fire( new Receiver<List<SubjectProxy>>() ...

It works just fine.


2) Then I am creating new instance of Professor

      request = requestFactory.professorRequest();
      professor = request.create( ProfessornProxy.class );
     professor.setSubjects(new ArrayList<Subject>());

     // subject is taken from the list which was downloaded before
    professor.getSubjects().add(subject);

3) then i want to save it into database

request.save().using( professor ).fire( new Receiver<Void>() ...

4) Unfortunately the list of subjects isn't propagated to the server
side.. When I look on Professor class in the debug on the server side
I see only empty array. So the  Professor is saved into database but
without any dependencies to Subjects

Besides on FireBug console in POST Responce I see message

{"result":null,"sideEffects":{"DELETE":[{"!
id":"org.test.subjectpr...@185"}]},"related":{}}



Can somebody tell me what I am doing wrong? and how to save Professor
class properly with all lists?
I have also tried to use with("subjects") but it didn't help..


greetings,
agata

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-web-toolkit?hl=en.

Reply via email to