NHibernate 3.1 (the currently available release of GA) and previously do not support FK when creating schemas through SchemaExport / SchemaUpdate. If FK are present, NHibernate will use them. In fact, the database will use them, and NHibernate will report any FK violations as HibernateExceptions, like any other database.
Support for generating FK using SQLite is planned for release in NHibernate 3.2. The fix is ββin the torso, in particular R5543:
https://github.com/JamesKovacs/nhibernate/commit/2711450b8fcea66df41699ac595b4cc814d7f64b
NB This is my GitHub mirror of the official SVN repo at SourceForge.net. GitHub just does faster and faster work on formatting patches.
source share