I am trying to get my StatelessSession query to fetch an associated object via Join but instead I am getting a proxy. Is this not possible?
For example:
Code:
Criteria crit = session.createCriteria(AdEngineAccount.class);
crit.setFetchMode("engineAccount", FetchMode.JOIN );
List<AdEngineAccount> accounts = crit.list();
...
for ( AdEngineAccount account : accounts ) {
System.out.println( account.getEngineAccount().getName() );
}
I get "proxies cannot be fetched by a stateless session".
Doesn't crit.setFetchMode("engineAccount", FetchMode.JOIN ); indicate that a proxy is not to be used?
Any help would be appreciated.
Thanks
- Doug