Hi
i have a problem with collection joined with a composite-id
this is a xml:
TABLE1
<class name="ObjectModel.Auth.Profile, ObjectModel" table="Auth_Profile">
<id name="Id" type="Int32" column="Id" access="field.pascalcase-m-underscore">
<generator class="identity" />
</id>
<version name="RowVersion" column="RowVersion" type="Int32" unsaved-value="0" />
<bag name="resourceprofiles" inverse ="false" cascade="all">
<key column="IdProfile" />
<one-to-many class="ObjectModel.ACL.ResourceProfile, ObjectModel" />
</bag>
<bag name="profileactions" inverse ="false" cascade="all">
<key column="IdProfile" />
<one-to-many class="ObjectModel.Auth.ProfileAction, ObjectModel" />
</bag>
<property name="Description" column="Description" type="String" />
</class>
TABLE2
<class name="ObjectModel.Auth.ProfileAction, ObjectModel" table="Auth_ProfileAction">
<composite-id>
<key-many-to-one name="Action" class="ObjectModel.Auth.Action, ObjectModel" column="IdAction" />
<key-many-to-one name="Profile" class="ObjectModel.Auth.Profile, ObjectModel" column="IdProfile" />
</composite-id>
<version name="RowVersion" column="RowVersion" type="Int32" unsaved-value="0" />
<bag name="profileactionproperties" inverse ="false" cascade="all">
<key>
<column name="IdAction" />
<column name="IdProfile" />
</key>
<one-to-many class="ObjectModel.Auth.ProfileActionProperty, ObjectModel" />
</bag>
<property name="CanCreate" column="CanCreate" type="Boolean" />
<property name="CanDelete" column="CanDelete" type="Boolean" />
<property name="CanExecute" column="CanExecute" type="Boolean" />
<property name="CanRead" column="CanRead" type="Boolean" />
<property name="CanUpdate" column="CanUpdate" type="Boolean" />
type="DateTime" />
</class>
TABLE3
<class name="ObjectModel.Auth.ProfileActionProperty, ObjectModel" table="Auth_ProfileActionProperty">
<id name="Id" type="Int32" column="Id" access="field.pascalcase-m-underscore">
<generator class="identity" />
</id>
<version name="RowVersion" column="RowVersion" type="Int32" unsaved-value="0" />
<property name="CreateTimestamp" column="CreateTimestamp" type="DateTime" />
<property name="CreateUser" column="CreateUser" type="Int32" />
<property name="Guid" column="Guid" type="Guid" />
<many-to-one name="ProfileAction" class="ObjectModel.Auth.ProfileAction, ObjectModel" cascade="none">
<column name="IdAction" />
<column name="IdProfile" />
</many-to-one>
<many-to-one name="Property" column="IdProperty" class="ObjectModel.Domain.Property, ObjectModel" cascade="none" />
<property name="IsAllowed" column="IsAllowed" type="Boolean" />
<property name="UpdateTimestamp" column="UpdateTimestamp" type="DateTime" />
<property name="UpdateUser" column="UpdateUser" type="Int32" />
</class>
PROBLEM:
When i load a Profile (Table1) and navigate into collection child ProfileAction (Table2), the record of this child do not contain any child of collection ProfileActionProperty (Table3)
but the record exist and are relationed into database.
Hibernate version: 1.0.2
Name and version of the database you are using: SqlServer 2000
|