Thank you Chris. I copied the User entity to class User2 and removed
all JPA 2 annotations: Without the annotations it works!
in the following example getUser1(), getUser3() and getUser4() work,
getUser2() fails...
@Service("testService")
public class TestServiceImpl implements TestService {
public User getUser1() {
User u = new User();
u.setGroups(new HashSet<Group>());
u.setId(0);
u.setPassword("pw");
u.setUsername("name");
return u;
}
public User getUser2() {
return new User();
}
public User2 getUser3() {
User2 u = new User2();
u.setGroups(new HashSet<Group>());
u.setId(0);
u.setPassword("pw");
u.setUsername("name");
return u;
}
public User2 getUser4() {
return new User2();
}
}
As a workaround I could use data transfer objects in the real
services. Maybe it's a good idea anyway.
--
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.