Hello,

Does anyone know if this:

<class name="Holiday" table="holidays">
  // ... Some properties ..

  <set name="Prices" table="Prices">
      <composite-element class="Price">
        <parent name="Holiday" />
         <property name="Id" column="id" insert="false" update="true"/
>
         <property name="PricePerUnit"  />
         <property name="UnitsFrom" />
         <property name="UnitTo" />
      </composite-element>
    </set>
</class>


or something along these lines, is possible?

The reason is I have a set of immutable prices in my model which is a
combination of the price, units and the holiday. In the database the
price row also gets a seeded Id.  It would be very useful to have this
as a read only property but if I add it to the Price class NHibernate
kindly attempts to but a value in it.

As a workaround I'm using the HashCode as a identifier but this feels
like a hack.

Many thanks, Keith.

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