Hi,
I'm using a ClientProxy object with a subset of the details from a full Client object.
How can I create a query that queries using criteria from the full Client object but which returns only that information in ClientProxy?
For example a Client has a marital status attribute, while a ClientProxy does not, but I want a list of ClientProxy's who are married.
If i use
Criteria crit = getSession().createCriteria(ClientProxy.class);
Hibernate complains that it cannot access the status attribute of ClientProxy (because there is none)
If i use
Criteria crit = getSession().createCriteria(Client.class);
I get a list of Clients, rather than ClientProxy's.
Thanks, hope I explained it sufficiently.
|