Does SQLite coupled with NHibernate support referential integrity / foreign keys?

别来无恙 提交于 2019-12-01 06:42:37

NHibernate 3.1 (currently available GA release) and earlier do not support FKs when generating a schema through SchemaExport/SchemaUpdate. If FKs are present, NHibernate will use them. Actually the database will use them and NHibernate will report back any FK violations as HibernateExceptions, just like any other database.

Support for FK generation with SQLite is scheduled for release in NHibernate 3.2. The fix is in the trunk, specifically R5543:

https://github.com/JamesKovacs/nhibernate/commit/2711450b8fcea66df41699ac595b4cc814d7f64b

N.B. This is my GitHub mirror of the official SVN repo on SourceForge.net. GitHub just does a nicer, faster job on formatting patches.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!