How can I prevent NHibernate from deleting a single object of a particular class? The programmatic method that I am currently using includes checking the unique field of the entity "Name".
Here is the scenario: I have a person and a group. A group can have people and other groups. If a group with the name βAdminsβ is trying to delete, it will not be due to restrictions on the level of transactions that I use (in particular, to check the column / field βNameβ), because it is unique). So good.
But now I think that if another group is created, and the "Admins" become a subgroup of this, the verification will fail. This will mean the removal of "admins." Therefore, I am looking for a better way than to cross the parent / child containment tree, for example. using NHibernate
I cannot use a class constraint such as "class Mutable = false", I mean a read-only constraint for one or two separate objects of a particular class.
Hi,
_NT
_NT
source share