I also tried List<String> addresses instead of Set<String> addresses but it still returns an empty list despite the datastore having values in the addresses field for that user.
On Oct 19, 12:56 am, keyvez <[email protected]> wrote: > My EntityProxy looks like this > > @ProxyFor ( User.class ) > public interface UserProxy extends EntityProxy { > > Long getId(); > > String getFirstname(); > > String getLastname(); > > Set<String> getAddresses(); > > void setAddresses( Set<String> addresses ); > > } > > And my Entity class look like this: > > @Entity > public class User { > > @Id > @GeneratedValue ( strategy = GenerationType.IDENTITY ) > private Long id; > > @NotNull > private String firstname; > > @NotNull > private String lastname; > > private Set<String> addresses; > > public void setAddresses( Set<String> addresses ) { > > this.addresses = addresses; > } > > public Set<String> getAddresses() { > > if ( addresses == null ) { > addresses = new HashSet<String>(); > } > return addresses; > } > > } > > When I make a request using RequestFactory like so: > > Request<UserProxy> createReq = request.authenticate().using(user); > > createReq.fire(new Receiver<UserProxy>() { > > @Override > public void onSuccess( UserProxy authenticatedUser ) { > > System.out.println(authenticatedUser.getFirstname()); // > prints "First name of Person" as expected > > System.out.println(authenticatedUser.getAddresses().size()); // prints > 0 instead of the no. of addresses, which is more than 0 for this user > > } > > }); > > I am using JPA on app engine. > > It look like RequestFactoryServlet is not able to properly serialize > collection properties of datastore objects. Any help in this regard > would be greatly appreciated. > > Thanks, > Gaurav -- 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.
