Hi Ümit, I was actually checking the payload via the DefaultRequestTransport, I could see the user proxy object but I could not see the id anywhere in the payload. I had also put a println in the setID method in the DTO but it was never called which is what I thought was strange since the object seemed to go across the wire. I haven't checked the payload more formally with Chrome's developer tools, so I'll try that next like you suggested after dinner and see if that clears things up, will post back. Thanks for answering.
On Monday, June 17, 2013 5:21:48 PM UTC+2, Ümit Seren wrote: > > For debugging: Check the RF payload with Chrome Developer Tools and put a > breakpoint in the siteId() method of your backend DTO (it should be called > after the object is created). > > > On Monday, June 17, 2013 3:59:02 AM UTC+2, GWTter wrote: >> >> Hi all, >> >> I have the same setup as in question >> https://groups.google.com/d/msg/google-web-toolkit/GUQjZ98mL7s/MoA2gEMmS28J >> . >> I've included the relevant code from the question below for quick >> reference. My problem is that once the booking entity gets to the server >> and I look for the user, the user field is not null, but the id on the user >> is? Thus I can't check for the actual user. Is the user id not being set in >> the payload for some reason, or is it not building the user entity >> correctly on the server? Thanks a lot in advance for any help, much >> appreciated. >> >> -Seth >> >> MainRequestFactory.BookingRequest bookingRequest = >> reqFactory.bookingRequest(); >> BookingProxy bookingProxy = >> bookingRequest.create(BookingProxy.class); >> UserProxy userProxy = bookingRequest.create(UserProxy.class); >> >> userProxy.setId(12); >> >> bookingProxy.setUser(userProxy); >> >> Request<Void> persistRequest = >> bookingRequest.persist().using(bookingProxy); >> persistRequest.fire(new Receiver<Void>() { >> @Override >> public void onSuccess(Void response) { >> GWT.log("persisted"); >> } >> }); >> > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/groups/opt_out.
