Click here to Skip to main content
15,920,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I have been reviewing an application, that uses NHibernate. When I investigated the data structure of the database there were no foreign keys.

If the application manages the relationships between the entities should the database (MSSQL) have foreign keys set up?
Updated 7-Feb-13 11:01am

1 solution

Some years ago, NHibernate had problems with foreign keys: NHibernate treated all foreigns keys as if they had referential integrity enforced and did not accept null values. I do not know if NHibernate can cope with such a situation now, since that was my first project with NHibernate, and because of those problems I avoided it since then.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900