Tom, thanks for your effort. I tried using IList, but that didn't
change anything (as I replied on the nhusers mailing list). The catch
was that I needed to specify the "WHERE" clauses with Overrides like
this:

.Override<Employee>(map => map.HasMany(m =>
m.NightlyRates).Where("RateType = 'NightlyRate'"))

I'm wondering though, why your solution was working as expected...

Regards,
 Miha

On Aug 17, 8:49 pm, tbushell <tbush...@bic.com> wrote:
> Miha,
>
> (I replied to your post on NHUsers, but here it is again...)
>
> I am also using FNH automapping in my project, and have a similar
> requirement to map multiple ILists of the same type in some of my
> classes.
>
> Following advice from the FNH mailing list, I ended up with a
> solution
> almost identical to yours, a base class (though it's not defined as
> Abstract), and a derived class for each IList that is a member of the
> same class.
>
> This Automaps perfectly well _as is_ - no overrides, no where
> clauses,
> no mapping files are needed.
>
> I see you are using ISets, not ILists, and am not sure if Automapping
> supports ISets.  But I know this approach works very well with
> ILists.
>
> The other difference I see is that you are using private backing
> variables for your ISets.  This is a fairly recent addition to FNH
> Automapping that was not available to me several months ago when I
> started my project.
>
> -Tom Bushell

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