FAQ Database Discussion Community


NHibernate SchemaExport.Execute does not create table

c#,nhibernate,nunit,nhibernate-configuration
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...

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

c#,.net,nhibernate,fluent-nhibernate,nhibernate-configuration
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...