I have mapping for A and B classes, where 'one' side is A and 'many' side is B. B references A where foreign key is not nullable. Mapping of A set as Cascade.Delete() for B with FluentNH. When I try to delete A, NHibernate tries to update B and set foreign key to null. So error happens as foreign key is not nullable.
What should I do? Make the foreign key nullable?
EDIT: When I set the foreign key to nullable it works. But is this the right way to go?