简体   繁体   English

无法在NHibernate中读取hilo值

[英]Could not read hilo value in NHibernate

For our ASP.NET MVC application we are seeing the following in our error log: 对于我们的ASP.NET MVC应用程序,我们在错误日志中看到以下内容:

IdentifierGenerationException could not read a hi value from table 'nhibernatehiloidentity' using the where clause (entity = '[table name]') IdentifierGenerationException无法使用where子句(entity ='[table name]')从表'nhibernatehiloidentity'中读取hi值

The [table name] can vary. [table name]可以有所不同。 We know there is an entry in the nhibernatehiloidentity table as it would fail each time, which it does not. 我们知道nhibernatehiloidentity表中有一个条目,因为它每次都会失败,但事实并非如此。 My current theory is locking is randomly preventing a read from the hilo table. 我目前的理论是锁定是随机阻止从hilo表读取。 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? 有没有其他人在NHibernate中生成hilo ID有问题?

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

I don't use Hi-Lo this way, but I guess that the record with the corresponding table name doesn't exist. 我不这样使用Hi-Lo,但我猜这个带有相应表名的记录不存在。 Hi-lo tables need to be initialized with a value. Hi-lo表需要用值初始化。 Just a guess. 只是一个猜测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM