views:

645

answers:

1

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 
)
+1  A: 

Figured it out...

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

related questions