-->
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: class property and sql-query return-property strict mapping?
PostPosted: Tue Oct 27, 2009 1:13 am 
Newbie

Joined: Tue Oct 27, 2009 12:55 am
Posts: 2
Hi buddies,
I am a beginner in hibernate field, now I am doing a project which uses hibernate to call procedures, now It works, but an issue is not fixed.
I have a module called Opportunity which has more than sixty columns, so in opportunity.hbm.xml, <class> tag includs all the properties, but for some searching, we only need several columns, so I confige <sql-query> with reqired columns, but when executed, an error raised, only <sql-query> has all the columns, It works. can any body tell me if there is some ways to handle this? or it only allow strictly mapping for <class> and <sql-query> mapping?

maybe U are little confused, like me give a example,
<hibernate-mapping>
<class dynamic-update="true" table="TI_UI_OPPORTUNITY"
name="com.cvs.ti.model.Opportunity">
<id name="rowNbrId" column="ROW_NBR_ID"/>
<property name="opporInd" column="OPPOR_IND" />
<property name="storeNbr" column="STORE_NBR" />
</class>
<sql-query name="getOpporDetails" callable="true">
<return alias="opporDetails" class="com.cvs.ti.model.Opportunity">
<return-property name="rowNbrId" column="ROW_NBR_ID"/>
<return-property name="opporInd" column="OPPOR_IND" />
</return>
{Call TI.p_store_user.SP_TI_STORE_GETOPPORDETAILS(?,?,?,?)}
</sql-query>
</hibernate-mapping>
for above example, there are 3 columns properties in class tag, but only two columns in <sql-query> return property, is it possible?


Top
 Profile  
 
 Post subject: Re: class property and sql-query return-property strict mapping?
PostPosted: Tue Oct 27, 2009 9:39 pm 
Newbie

Joined: Tue Oct 27, 2009 12:55 am
Posts: 2
is there anyone can give some suggestions, that will be highly appreceiatted


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.