FAQ Database Discussion Community

FluentNHibernate HiLo - can be maxLo read from table and not to be hardwired in code?

I am using GeneratedBy.HiLo(string table, string column, string maxLo, string where); for primary key. Currently I am looking for possibility how to load maxLo from table rather than store it as a constant in code. Value for NextHi is loaded from database table (ok, it must be otherwise whole concept...

NHibernate SchemaExport.Execute does not create table

Learning NHibernate by following this tutorial Your first NHibernate based application and I got to the point where you call new SchemaExport(cfg).Execute(true, true, false); in a test method to export the schema (create the Product table) for verifying NHibernate was set up correctly [Test] public void Can_generate_schema() { var cfg...