THIS IS REALLY SERIOUS! PLEASE TAKE CARE OF THIS ASAP!
Code generation to .NET does not accept not nullable foreign keys in relationships generated from uni-directional associations (see the sample message attached in a file; btw, the message is nonsense: it contains contradicting statements!). So I have to change columns to nullable (changing associations to bi-directional is not an option!). However, when I synchronize classes to ERD, all these changes are gone!
Not accepting non-nullable FK is a limitation of NHibernate.
Foreign key’s nullable property’s value is depending on the multiplicity of the association end of the corresponding class model. When synchronize from Class Diagram to ERD, if multiplicity is 0…* nullable will be true, if multiplicity is 1…* nullable will be false. Therefore, you need to synchronize from ERD to Class Diagram first to make the multiplicity become 0…*.