|
From: mod s. (JIRA) <nh...@gm...> - 2011-06-25 20:52:43
|
Associated Collection for composite-id object doesn't load with query.
----------------------------------------------------------------------
Key: NH-2776
URL: http://216.121.112.228/browse/NH-2776
Project: NHibernate
Issue Type: Bug
Components: Core
Affects Versions: 3.2.0Beta2
Reporter: mod sartawi
I have standard header-detail mapping..
// Header
<class name="CheckbookTrx" table="CheckbookTrx">
<composite-id>
<key-property name="TrxType" />
<key-property name="TrxNumber" />
</composite-id>
<property name="TrxType" />
<property name="TrxDate" />
<property name="Amount" />
<property name="Description" />
<property name="CheckbookID" />
<set name="TrxDetails" table="CheckbookTrxDetail" >
<key >
<column name="TrxType" />
<column name="TrxNumber" />
</key>
<one-to-many class="CheckbookTrxDetail" />
</set>
</class>
/////////////// detail //////////////////
<class name="CheckbookTrxDetail" table="CheckbookTrxDetail">
<composite-id>
<key-many-to-one name="Trx">
<column name="TrxType"/>
<column name="TrxNumber"/>
</key-many-to-one>
<key-property name="LineNumber" />
</composite-id>
<property name="AccountNumber" />
<property name="Debit" />
<property name="Credit" />
<property name="LineDescription" />
</class>
////////////////////////////////////
when I create new object for header and detail and save it to database it's work fine.
but when I query from database it's load header object with empty details, but when I use for header single ID it's load it with details. BTW I try query by LINQ and by other ways and use all fetch types but no luck.
Thanks in advance.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|