Critical bug in code generation: "nullable foreign key with uni-directional relationship"

Jick,

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!

Cheers,
Tadeusz


vp error msg 1.PNG

Hello Tadeusz,

Thank you for your post once again. How are you? Hope you are well.

We are checking this issue. If we will fix the tool, I will send you a patch after fixed. If we need to fix your project, we will fix this one:
http://forums.visual-paradigm.com/posts/list/2571.html

and send you back as soon as possible.

Best regards,
Jick

Hello Tadeusz,

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…*.

Best regards,
Jick