Hello,
I have the following Mapping file..
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" >
<class name="StaticData.Product, StaticDataLibrary"
table="tbl_EspadaProduct" lazy="false">
<id name="Id" column="Id" type="string">
<generator class="assigned" />
</id>
<property name="MarketId" column="MarketIdFk" />
<property name="DisplayName" column="DisplayName" />
<property name="SubMarket" column="SubMarket" />
<bag name="OrderTypes" table="tbl_EspadaSyntheticProductTypeLnk"
lazy="false" >
<key column="Type" property-ref="SubMarket"/>
<many-to-many class="StaticData.OrderType, StaticDataLibrary"
column="ProductType" lazy="false"></many-to-many>
</bag>
</class>
</hibernate-mapping>
This seems to cause collection is not associated with any session
error.
If I change
<key column="Type" property-ref="SubMarket"/>
tp
<key column="Type" foreign-key="SubMarket"/>
I don't get the error, but the Sql generate uses Id rather than
SubMarket as the parameter.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---