Hm, I only see "string name" and "params string[] names" Add method
signatures. Is it in a newer release? I can't tell the exact release
that I'm using but it's couple of months old.
On Nov 19, 9:58 am, Paul Batum <
paul.ba...@gmail.com> wrote:
> Are you talking about one to many's or many to many's? Your code example is
> a one to many, and it can be done like this:
>
> public class ProductMap : IAutoMappingOverride<Product>
> {
> public void Override(AutoMapping<Product> mapping)
> {
> mapping.HasMany(x => x.Components)
> .KeyColumns.Add("ProductId", c => c.Index("someIndex");
> }
> }
>
> Unfortunately the same is not true for many to many's (mapped with
> HasManyToMany) as we have not yet migrated them over to use the
> ColumnMappingCollection that the one to many relies on.
>
> On Tue, Nov 10, 2009 at 3:14 AM, Sergey Prokhorenko <
>
>
sergey.prokhore...@gmail.com> wrote:
>
> > How do I tell Automapping (using conventions?) to auto-create indexes
> > on n-to-n associations?
>
> > public class ProductMap : IAutoMappingOverride<Product>
> > {
> > public void Override(AutoMapping<Product> mapping)
> > {
> > mapping.HasMany(x => x.Components).Index("...")
> > }
> > }
>
> > there's no Index() available. How do I index the Components.ProductId
> > field?
> > --~--~---------~--~----~------------~-------~--~----~
> > You received this message because you are subscribed to the Google Groups
> > "Fluent NHibernate" group.
> > To post to this group, send email to
fluent-n...@googlegroups.com
> > To unsubscribe from this group, send email to
> >
fluent-nhibern...@googlegroups.com<
fluent-nhibernate%2Bunsu...@googlegroups.com>