You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tool and Version
EarlyBoundGenerator V 2.2024.5.16
Describe the bug
I wanted to try out #311. It generates nullable types. When compiling the generated code there is a compile error:
Possible null reference argument for parameter 'entity' in 'void Entity.SetRelatedEntity<Contact>(string relationshipSchemaName, EntityRole? primaryEntityRole, Contact entity)'
The relevant line of code is this.SetRelatedEntity<Contact>("account_primary_contact", null, value);
value can be null in this case. SetRelatedEntity() does handle null values correctly but the nullable entity type has to be used like this: this.SetRelatedEntity<Contact?>("account_primary_contact", null, value);
To Reproduce
Steps to reproduce the behavior:
Generate the code for an Account with nullable types enabled.
Compile it.
Expected behavior
No errors.
Additional context
My C# project file looks like this:
Tool and Version
EarlyBoundGenerator V 2.2024.5.16
Describe the bug
I wanted to try out #311. It generates nullable types. When compiling the generated code there is a compile error:
The relevant line of code is
this.SetRelatedEntity<Contact>("account_primary_contact", null, value);
value
can be null in this case. SetRelatedEntity() does handle nullvalue
s correctly but the nullable entity type has to be used like this:this.SetRelatedEntity<Contact?>("account_primary_contact", null, value);
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No errors.
Additional context
My C# project file looks like this:
The text was updated successfully, but these errors were encountered: