Hi,
I’m using NHibernate 2.1.0.4 and VB.NET with Oracle.
Is it possible to have a one-to-many relation to a class that has a composite key being able to provide only one key property of the composite key?
In my case:
Code:
<class name=" Component " table="Component" >
<composite-id name="CompositeId" class="CompositeId">
<key-property name="ComponentTypeId" column="ComponentTypeId"/>
<key-property name="ComponentId" column="ComponentId"/>
</composite-id>
</class>
I have then the Policy class that has a one-to-many relation with the Component class but can only provide the ComponentId property.
Is there a way to set the ComponentTypeId maybe through a SQL query?
Thanks in advance!