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: Paging subentities NHibernate
PostPosted: Fri Sep 07, 2007 11:36 am 
Newbie

Joined: Fri Sep 07, 2007 11:21 am
Posts: 1
Hello all.
I have the folloving question.
Let's suppose we have the following mapping file:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
assembly="nhibernate_test"
namespace="nhibernate_test">

<class name="CompanyEntity" table="gl_company">

<id name="CompanyNo" column="gl_company_no" unsaved-value="-1">
<generator class="native" />
</id>

<property name="Id" access="property">
<column name="id" />
</property>

<property name="Name" access="property">
<column name="name" />
</property>

<set
name="Comments" table="gl_company_comments"
cascade="all-delete-orphan"
lazy="true" inverse="false">

<key column="gl_company_no" />
<many-to-many class="AppCommentEntity" column="app_comment_no" />
</set>

</class>


<class name="AppCommentEntity" table="app_comments">
<id name="AppCommentNo" column="app_comment_no" unsaved-value="-1">
<generator class="native" />
</id>
<property name="CommentDate" access="property">
<column name="comment_date" />
</property>
<property name="CommentType" access="property">
<column name="comment_type" />
</property>
<property name="Comments" access="property">
<column name="comments" />
</property>
<property name="CreateDateTime" access="property">
<column name="create_date_time" />
</property>
<property name="CreateUserNo" access="property">
<column name="create_app_user_no" />
</property>
<property name="UpdateDateTime" access="property">
<column name="update_date_time" />
</property>
<property name="UpdateUserNo" access="property">
<column name="update_app_user_no" />
</property>

</class>

</hibernate-mapping>

To make the long maping file short, we have a CompanyEntity class that has a many-to-many set of AppCommentEntity classes.
My goal is to call the CRUD functions with the CompanyEntity class and add/delete/update AppCommentEntity classes using the Comments property of the company class. No problem so far. But now I want to get the AppCommentEntity classes paged and not lose the CRUD functions on the root entity and still be able to add/delete/update the child classes.


Is there any way of doing this?


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.