Should be as simple as, CompositeId().KeyProperty(x =>
x.BusinessCode).KeyProperty(x => x.ZoneCode);

On Jun 23, 3:41 pm, Berto <bertofors...@gmail.com> wrote:
> Hi,
> I have a problem with a composite-id mapping on a legacy database. How
> can I create a mapping like this with Fluent Nhibernate??
>
> <class name="Zone" table="ZONE">
>    <composite-id class="ZoneID" name="ID">
>       <key-property name="BusinessCode"  />
>       <key-property name="ZoneCode" />
>     </composite-id>
> ...
> </class>
>
> ZoneID the ID class
>
> public class ZoneID
> {
>         public virtual string BusinessCode { get; set; }
>         public virtual string ZoneCode { get; set; }
>
> }
>
> any ideas??
>
> thx
> Massimo

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to