Enable referential integrity with nHIbernate using SQlite database

£可爱£侵袭症+ 提交于 2019-12-23 05:18:06

问题


Good evening everyone,

I've got a project using nHibernate (2.1.2.4000) and System.Data.SQLite (1.0.66.0). I want to enforce NHibernate to create foreign keys when it creates the database or at least use the "foreign key" keyword then I'll be able to create the triggers.

I googled but I didn't find any documentation on how to do that and I'm loosing the faith. I really don't want to (and I won't) check referential integrity inside my code.

In a word: how do I enable referential integrity (or equivalent) with nHibernate and SQLite?

Thanks in advance,


回答1:


Better late than never: here's an answer:

Foreign Keys with SchemaExport in Fluent NHibernate using SQLite

nHibernate Issue Tracker



来源:https://stackoverflow.com/questions/3515484/enable-referential-integrity-with-nhibernate-using-sqlite-database

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