Hi Pavel,

I will be looking at and applying both your patches tomorrow.

Many thanks,

Paul Batum

On Sun, Oct 19, 2008 at 7:18 PM, Pavel Samokha <[EMAIL PROTECTED]
> wrote:

> I have run into another issue with Fluent NHibernate - I need to set class
> within many-to-one. In my case, it is needed, because I prefer to define
> associations with interfaces rather than classes. For example: public class
> Bus{ public IDriver Driver {get;set;} public IList<IPassenger> Passengers
> {get;set;} } But in NHibernate I map Driver:IDriver class, so when I define
> mapping for Bus I need to define <many-to-one class="Driver" name="Driver">
> - but currently in FN only option is References(x=>x.Driver) and then using
> property's type (IDriver), which is unmapped, without a way to explicitly
> define class for Reference. Note that no problems for collections -
> HasMany<Passenger>(x=>x.Passengers). Here is my patch that adds ability to
> define class - in following style - References<Driver>(x=>x.Driver). I'm not
> sure this is the best way, but from my experience class attribute is used in
> many-to-one very often - so we need to have way to set it.
>
> --
> Yours sincerely, Pavel Samokha
>
> >
>

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

Reply via email to