-->
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.  [ 2 posts ] 
Author Message
 Post subject: Applet - Hibernate - Lazy Fetching
PostPosted: Thu Feb 23, 2006 5:45 am 
Newbie

Joined: Wed Feb 22, 2006 1:14 pm
Posts: 2
Hello,

i've implemented a servlet, that provides an applet with data from a server-side database via hibernate. The data is encapsulated in a bean, that was generated from my database with hibernate tools in eclipse. My problem is, that hibernate's lazy-fetching doesn't work on the applet-side. How can I solve this problem?
1. Do I have to provide the transfered object with all the data, so that lazy-fetching is not necessary?

2. Is there a way to realise lazy-fetching between applet und servlet (hibernate)?

Thanks in advance!


Top
 Profile  
 
 Post subject: no way
PostPosted: Tue Feb 28, 2006 6:55 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
generally there is no need for separate DTO objects provided that lazy=true is not used, i.e. objects are fully initialized.

Also keep in mind that you might need to have hibernate.jar in the applet classpath because H uses own collection classes implementations, or you might want to transfer data from H collection implementation to the standard Java collection like this:
o.setList( new ArrayList( o.getList()) );

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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

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.