I'm having a problem that I don't really understand how to fix.

I have a parent/child relationship setup like the following:

Parent:

  <class name="Entity" table="Entity" >
    <id name="Id" type="DataAccessLayer.HierarchyIdType,
DataAccessLayer" column="entityId">
      <generator class="assigned"/>
    </id>
    <property name="Description" column="description" />
    <many-to-one name="EntityType" class="EntityType"
column="fkid_Type"/>
    <property name="Parent" column="parentId"
              type="DataAccessLayer.HierarchyIdType, DataAccessLayer"
              generated="insert" />
    <set name="Properties" inverse="true" lazy="true">
      <key column="fkid_entityId" />
      <one-to-many class="Property" />
    </set>
   </class>

Child:
  <class name="Property" table="Property">
    <composite-id >
      <key-property column="name" name="Name" />
      <key-many-to-one name="Entity" class="Entity"
column="fkid_entityId" />
    </composite-id>
    <property name="PropertyValue" column="property_value" />
  </class>

Whenever I try to access a the ISet<Property> in the Entity object, I
see that NHibernate just goes into an endless loop of querying the
entity table, and then the properties table.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to