Skip to content

Fluent index creation #63

Open
Open
@jagregory

Description

@jagregory

Patch from Robert, not sure why this never got applied. Will review post-1.1.

public class Indexes : FluentIndexBase
{
  public Indexes(Configuration configuration)
      : base(configuration)
  {
      AddDialectScope("NHibernate.Dialect.MsSql2005Dialect");

      ClusteredIndex<Person>().OnPrimaryKey();
      UniqueNonClusteredIndex<Person>().OnProperty(x => x.SSN);

      ClusteredIndex<SuperClass>().OnProperty(x => x.Person);
      UniqueNonClusteredIndex<SuperClass>().OnProperty(x => x.SomeProperty);
      NonClusteredIndex<SuperClass>().OnDiscriminator();
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions