-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple named check constraints #2567
Comments
This is the area of the NHibernate. |
@hazzik so is this a limitation of NHibernate itself rather than FluentNHibernate then? Happy to have a quick look at this if you could point me in the right general direction 😄 |
Yes, it is limitation of NHibernate. Sorry, I misstyped "area" first time as "are" :-) The NHibernate allows to specify only a single check for a column/class/etc.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently it's possible to specify multiple check constraints for an entity by just joining each constraint together with
"AND"
,"OR"
, etc. and passing the concatenated string tomapping.CheckConstraint()
.However, this results in a single check constraint in the database. For cases where there are multiple constraints it would be very useful to be able to specify them separately so that they appear as multiple check constraints within the database. This would make it much more obvious why an insert has failed as the check constraint would be much more specific.
Would this be something that can be easily implemented?
The text was updated successfully, but these errors were encountered: