-->
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: How to get a virtual view entity of hibernate level?
PostPosted: Tue Nov 22, 2005 3:45 am 
Newbie

Joined: Tue Nov 22, 2005 3:19 am
Posts: 6
hello everybody:
I am a new hibernator,I want a virtual view entity of hibernate level.
as we know we can use " create view ViewName as select blablabla" to create a view entity of database level,but it is a little complex because I have to mapping it to a POJO,then use the POJO.

today ,I want a view entity of hibernate level,only need a few configuration(may be write xml file) to make it out, then I can use HQL statement to query it, that is what i want.

I have heard that the new version hibernate has the function that I want,but I dont know how to use,so post the question , thanks.

notice , the ofbiz has the function ,the script below create a view entity of ofbiz level,and we can use it by query " List employeeList =delegator.findByAnd("EmpolyeeDepartmentDetailInfo",UtilMisc.toMap("employeeId",emId)); "

<view-entity entity-name="EmpolyeeDepartmentDetailInfo" package-name="org.ofbiz.commonapp.kmp" title="员工部门的详细信息" copyright="GEI">
<description/>
<member-entity entity-alias="EM" entity-name="Empolyee"/>
<member-entity entity-alias="DP" entity-name="Department"/>
<alias entity-alias="EM" name="employeeId"/>
<alias entity-alias="EM" name="employeeName"/>

<alias entity-alias="DP" name="departmentTitle"/>

<key-map field-name="CurrentDepartmentId" rel-field-name="departmentId"/>
</view-link>
</view-entity>


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.