Guys,
I have been struggling to get this working for a while now...

I don't seem to be able to specifically map a bag (to an Ilist) of a
subclass, I keep getting the error "Invalid column name
'EntityTypeID'", im sure its a something ive missed in the mapping as
it doesnt look like nhibernate generating the sql to link the
subclasses to the parent.

for example if I try to create a bag of customfields (subclass of
fields) from my EntityType class like this:

 <bag name="CustomFields"  inverse="true">
      <cache usage="read-write" />
      <key column="EntityTypeID"  />
      <one-to-many class="CustomField"/>
    </bag>

and my parent/subclass mapping looks like this:

<class name="Field" table="bs_Field" abstract="true" >
    <id name="Id" type="Int32" column="Id" unsaved-value="-1">
      <generator class="native"/>
    </id>
    <property  ...
    <many-to-one name="EntityType" class="EntityType"
column="EntityTypeId" />
    ....
    <joined-subclass name="CustomField"
                     extends="Field" table="bs_CustomField">
            <key column="Id" />

           <property .....

   </joined-subclass>
   <joined-subclass .....
</class>


any help would be greatly appreciated, I just cant see what I'm
missing....

-- 
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