Could not read hilo value in NHibernate

111 Views Asked by At

For our ASP.NET MVC application we are seeing the following in our error log:

IdentifierGenerationException could not read a hi value from table 'nhibernatehiloidentity' using the where clause (entity = '[table name]')

The [table name] can vary. We know there is an entry in the nhibernatehiloidentity table as it would fail each time, which it does not. My current theory is locking is randomly preventing a read from the hilo table. However, the above exception is the only information we have to go off of.

Has anyone else had issues with generating hilo Ids in NHibernate?

.NET 4.5, MVC 5.2, SQL Server 2012 and NHibernate 4.

1

There are 1 best solutions below

1
Stefan Steinegger On

I don't use Hi-Lo this way, but I guess that the record with the corresponding table name doesn't exist. Hi-lo tables need to be initialized with a value. Just a guess.