nhibernate/NHibernate.Mapping.Attributes

NHMA-5 - Add an InlineComponentAttribute to NHMA

Opened this issue · 0 comments

Pierre Henri Kuaté created issue - 13/Jun/07 5:25 AM

This feature is discussed here: http://www.manning-sandbox.com/thread.jspa?threadID=18958
Basically, the idea is to be able to map a component like a collection.


Anton added a comment - 11/Jul/07 7:17 PM

Is there a chance to map one component in several classes, but column names of component members in each class are different:

1st class:

<component class="ClassifierPrimaryKey" name="_RouteType" access ="field">
  <property name="id_base" column="`id_base_routetype`" type="System.Nullable`1[System.Int32]" access="field"></property>
  <property name="id_item" column="`id_item_routetype`" type="System.Nullable`1[System.Int32]" access="field"></property>
  <property name="version" column="`version_routetype`" type="System.Nullable`1[System.Int32]" access="field"></property>
</component>

2nd class:

<component class="ClassifierPrimaryKey" name="_CostType" access ="field">
  <property name="id_base" column="`id_base_costtype`" type="System.Nullable`1[System.Int32]" access="field"></property>
  <property name="id_item" column="`id_item_costtype`" type="System.Nullable`1[System.Int32]" access="field"></property>
  <property name="version" column="`version_costtype`" type="System.Nullable`1[System.Int32]" access="field"></property>
</component>

Pierre Henri Kuaté added a comment - 12/Jul/07 11:38 AM

I already thought about something like that; but the current implementation of NHMA makes it difficult.


Anton added a comment - 12/Jul/07 4:48 PM

So, it would be very useful...
We cannot make attribute mappings with current limitations