Hi,
Is it possible to set the default value of a property in NHibernate? Here is the scenario:
I have a self join table Category
. The class and table structure are as follows:
Category
int Id
string Name
Category ParentCategory
Category
int Id not null
varchar Name not null
int ParentCategoryId not null
If a category has no parent, the ParentCategoryId
must be 0.
How do I do this? TIA.