-->
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: Projection required in ome-to-many mapping
PostPosted: Fri Feb 15, 2008 5:47 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
Hibernate version: 3.1


Have two object

1. PurchaseOrder
2. Item

PurchaseOrder has one to many relationship with Item and it has below property in hbm.

My question is , Want to select only particular properties from Item object

Defaultly all properties of the Item object will be loaded while accessing setItems() from purchase order object, but i want to load only selected properties of Item now .Is there any way to do this in Hibernate mapping?

<set
name="items"
fetch="subselect"
lazy="true"
inverse="true"
batch-size="100">
<key
column="po_identifier"/>
<one-to-many
entity-name="master.Item"/>
</set>


Top
 Profile  
 
 Post subject: Projection required in one-to-many mapping
PostPosted: Mon Mar 31, 2008 12:34 am 
Newbie

Joined: Mon Mar 31, 2008 12:17 am
Posts: 1
Location: Bangalore
Hai All,

I am New to this forum.
I am also facing the same problem, So any one knows please share u r ideas ,

Thank u

_________________
Vinayak


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 22, 2008 6:18 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
I dont think that we have the facility/properties to do this in mapping files?

friends......any idea please


After a couple of years I have been working with Hibernate, I think we should not expect this type of projection, like lazy loading for the non associated properties , lazy loading should be done only for entities/objects(associated properties/objects)

But this can be discussed........

friends share your ideas/thought points

Thanks


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.