I used an old version of Nhibernate Fluent (1.0) that hasn't method
CompositeId with lamdba. I've updated the library and now it works...
Thanks!!!!!!!!
Massimo

On 25 Giu, 21:00, Chris C <chilve...@googlemail.com> wrote:
> Ah sorry, you're using a class there for the key, so you want:
>
> CompositeId(x => x.Zone).KeyProperty(x =>
> x.BusinessCode).KeyProperty(x => x.ZoneCode);
>
> On Jun 25, 7:54 pm, Chris C <chilve...@googlemail.com> wrote:
>
> > 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