更新时间:2023-01-29 17:17:27
I hit the same problem.
SQLite didn't initially support foreign keys(feature introduced in 3.6.19) so the NHibernate SQLiteDialect implementation doesn't know about foreign keys.
As SQLite doesn't support adding constraints through ALTER TABLE, only through CREATE TABLE parameters, the default foreign key creation of NHibernate is not used.
There's an incident logged on NHJIRA https://nhibernate.jira.com/browse/NH-2200