3

Yes, nit-picky is a good way to describe this... ;)

Does anyone know if you can specify the table and/or column names to use HiLo using Fluent NHibernate? Currently the schema export creates this...

create table hibernate_unique_key (
     next_hi INTEGER 
)
Sean Gough
  • 1,721
  • 3
  • 26
  • 47

1 Answers1

4

Figured it out...

public class IdGenerationConvention : IIdConvention
{
    public void Apply(IIdentityInstance instance)
    {
        instance.GeneratedBy.HiLo("MyTableName", "NextHighValue", "1000");
    }
}
Sean Gough
  • 1,721
  • 3
  • 26
  • 47