|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-30 19:06:42
|
[ http://216.121.112.228/browse/NH-2291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo closed NH-2291.
---------------------------
Resolution: Won't Fix
Too much time without a test.
btw it should be already supported using foreign-key="none"
> Support for unenforced foreign keys
> -----------------------------------
>
> Key: NH-2291
> URL: http://216.121.112.228/browse/NH-2291
> Project: NHibernate
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.1.2.GA
> Reporter: Vlad Golidnichuk
> Priority: Major
> Attachments: UnenforcedFKs.patch
>
>
> We are using NH to generate database schema for MS SQL Server from a mapping file through Configuration.GenerateSchemaUpdateScript(). The foreign keys that get created as part of this process are enforced (enabled) foreign keys.
> It is a requirement for our application to have foreign keys unenforced both for inserts/updates and for replication. The reason for that is, on large databases DRI impairs OLTP performance and concurrency. We have application level mechanisms to ensure data consistency and don't need to rely on DRI.
> On the other hand, we would like to have the (unenforced) foreign key constraints in the database for the benefit of report designers and
> diagramming tools which use DRI metadata to display table relationships.
> NHibernate currently has no support for unenforced foreign key constraints. This cannot be accomplished via a custom dialect or through Auxiliary Database Objects (see http://groups.google.com/group/nhusers/browse_thread/thread/c37b97ff90c9ce94)
> We are proposing a patch with (non-breaking) changes to the following core classes in order to enable unenforced foreign keys:
> NHibernate.Mapping.Constraint
> NHibernate.Mapping.ForeignKey
> NHibernate.Dialect.Dialect
> NHibernate.Dialect.MsSql2000Dialect
> See patch attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|