-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: StatelessSession and setFetchMode(FetchMode.JOIN) issue
PostPosted: Wed Aug 13, 2008 6:19 pm 
Beginner
Beginner

Joined: Mon Aug 22, 2005 1:22 am
Posts: 36
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.