天天看点

NHibernate could not get or update next value[SQL: ] 对象名 'hibernate_unique_key' 无效。

错误信息:

解决方法:

i’ve genereated a schema for my (sql 2005) db using schemaexport, and it’s created a table

when i try to add an entity, i get the error:

solution:

nhibernate expects to find a value that stores the current hi value in that table, ie it first runs something like:

so all you need to do is seed that table with an initial number, ie:

参考文章:

<a href="http://blog.csdn.net/luo86106/article/details/7305809">在部署OLAT到myeclipse,数据库配置正确的情况下,出现异常:error with hilo in nhibernate - “could not read a hi value - you</a>