-->
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.  [ 3 posts ] 
Author Message
 Post subject: Feature Question: Field Restriction
PostPosted: Mon Sep 19, 2005 8:49 am 
Newbie

Joined: Tue Aug 30, 2005 4:43 pm
Posts: 8
This is more of a general question that I have not been able to determine by reviewing the documentation. Is it possible to restrict the fields that Hibernate retrieves for a POJO? I've got tables/POJOs that have 60-70 fields each and in some situations I want to retrieve all the fields. However in other situations I only want to retrieve a minimal (4-5) number of fields, especially in scenarios where I'm bringing back large quantities. Is it possible to restrict the fields and if so how? Can you have a partially filled POJO? Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 9:03 am 
Beginner
Beginner

Joined: Mon Apr 12, 2004 6:33 pm
Posts: 35
Hibernate 3 enables you to set lazy="true" on the class. This means your properties are fetched lazily from the database.

_________________
Kees de Kooter

(don't hesitate to rate ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 19, 2005 9:09 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, it doesn't. It means that a proxy will be generated for the class so that an instance will only be loaded once it is accessed. The lazy="true" on a _property_ enables interception and lazy loading of individual properties. It requires bytecode instrumentation of the class for injection of interception code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.