Please could someone confirm whether or not updates to one-to-many
relationships are supported by RequestFactory?

For example, I have a class named Survey which relates to a list of
SurveyReplicates (see code below).  My app edits both the Survey and
the SurveyReplicates then sends the whole lot to the server:

@Entity
public class Survey {
        .....

        @OneToMany(mappedBy="survey", fetch=FetchType.EAGER,
cascade=CascadeType.ALL)
        public List<SurveyReplicate> getSurveyReplicates() {
                return surveyReplicates;
        }

        private Site site;
        @ManyToOne(cascade=CascadeType.MERGE, fetch=FetchType.EAGER)
        public Site getSite() {
            return site;
        }
}

The behaviour I have observed is when persist is called on the parent
object Survey, no updates to the SurveyReplicates arrive in the domain
object (checked several times through examining the object graph when
debugging). The JSON sent to the server _does_ however contain the
updates to the SurveyReplicates. Updates to the Survey  do arrive, as
do updates to the related Site object.

It would seem to be odd behaviour if these updates were not meant to
reach the domain object, given the editor framework supports editing
object graphs like this and these updates are sent to the server.

I'm using GWT trunk (19th November), but saw the same behaviour in
2.1.0.

Thanks

Will Temperley

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

Reply via email to