Meant to post this on FluentNHibernate's forum! If anyone wants to
follow this there: 
http://groups.google.com/group/fluent-nhibernate/t/df438c991d96d10e

On Jan 12, 12:07 pm, Chris Marisic <[email protected]> wrote:
> I'm trying to implement one of the many Convention classes in
> FluentNHibernate so I don't have
>
>             return AutoMap.AssemblyOf<NotifyRun>()
>                 .Where(t => t.IsA<BusinessEntity>())
>                 .IgnoreBase<BusinessEntity>()
>                 .Conventions.AddFromAssemblyOf<NHibernateSessionManager>
> ()
>                 .Override<MyClassA>(myClassA => myClassA .HasManyToMany
> (x => x.SomeTypesCollection).Table("SomeTypes"))
>                 .Override<AnotherClassB >(anotherClassB =>
> anotherClassB .HasMany(x => x.DifferentTypes))
>                 .Override<1MyClassA>(1myClassA =>
> 1myClassA .HasManyToMany(x => x.1SomeTypesCollection).Table
> ("1SomeTypes"))
>                 .Override<2AnotherClassB >(2anotherClassB =>
> 2anotherClassB .HasMany(x => x.2DifferentTypes))
>                 .Override<3MyClassA>(3myClassA =>
> 3myClassA .HasManyToMany(x => x.3SomeTypesCollection).Table
> ("3SomeTypes"))
>                 .Override<4AnotherClassB >(4anotherClassB =>
> 4anotherClassB .HasMany(x => x.4DifferentTypes))
>                 )
> etc
>
> On Jan 12, 11:42 am, Fabio Maulo <[email protected]> wrote:
>
> > Questions:
> > what is a convention overridden ?
> > is that another convention or a "purpurry" ?
> > Which convention have you applied if your are override it ?
>
> > 2010/1/12 Chris Marisic <[email protected]>
>
> > > Is it possible to create a convention that says if class is similar to
>
> > > MyClassA
> > > IList<SomeType> SomeTypesCollection {get;set;}
>
> > > That would be equivalent to
>
> > > Override<MyClassA>(a => a.HasManyToMany(x=>x.SomeTypesCollection).Table
> > > ("SomeTypes"))
>
> > > And a convention that would be like
>
> > > AnotherClassB
> > > IList<DifferentType> DifferentTypes {get;set;}
>
> > > That would be equivalent to
>
> > > Override<AnotherClassB>(a => a.HasManyToMany(x=>x.DifferentTypes))
>
> > > --
> > > 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]<nhusers%[email protected]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/nhusers?hl=en.
>
> > --
> > Fabio Maulo
-- 
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