Error: not-null property references a null or transient value


Enclosed you will find a simple model and a program with a few simple operations on classes from a model (BTW, the model could be even simpler).

I get the following error when I run this program:

“not-null property references a null or transient value: Engage.ILSA.Order.LocationSequence.LocationRef”

I do understand the reason of the error. My question is:
What is the best practice to handle a pattern presented in a model?


Hi Tadeusz,

Nullable foreign key column with uni-directional relationship is not supported in .NET ORM. Therefore, please change the relationship to bi-directional or allow the foreign key column to be null.

By the way, I suspect that you are using VP Suite 3.0, as this will be warned in VP Suite 3.1.

Best regards,