The property could not be set to a 'null' value

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
tbconrad
Posts: 8
Joined: Tue 17 Apr 2018 01:32

The property could not be set to a 'null' value

Post by tbconrad » Sat 08 Sep 2018 00:38

I updated to the latest version of Entity Developer 6.3.569 today and the associated Salesforce .net connector. Now I am getting messages like this

The 'ForeclosureShortsaleDate' property on 'Account' could not be set to a 'null' value. You must set this property to a non-null value of type 'System.DateTime'.

This is happening when I am pulling a record from the context. I have removed many fields from the model that have generated this error because I don't need them anyway but this is not ideal. Especially of the model needs to be recreated, Can anyone explain this to me? All of the columns in question have the Nullable property set to true.

Additional Info:
Template: DBContext

I can't say that the updated version is the issue because I don't know what the Salesforce team are doing in the Sandbox but this context worked properly last week by pulling and pushing data into the sandbox. Up until till this point there have been no model changes on my end. Any help would be appreciated.

UPDATE:
I created a clean and fresh model and I get the same results.

UPDATE: I believe it is indeed Devart Entity Developer. I checked the last version in version control and this is what the property looked like before version 6.3.569

Code: Select all

    /// <summary>
    /// There are no comments for BillingLatitude in the schema.
    /// </summary>
    public virtual global::System.Nullable<double> BillingLatitude
    {
        get;
        set;
    }
and what it looks like with 6.3.569

Code: Select all

    /// <summary>
    /// There are no comments for BillingLatitude in the schema.
    /// </summary>
    public virtual global::System.Double BillingLatitude
    {
        get;
        set;
    }
I'm going to revert to the last version and generate the model again.

UPDATE:
The problem is version 6.3.569 of Entity Developer. The Model Generation is not working properly.

this is the results from 6.3.555

Code: Select all

    /// <summary>
    /// There are no comments for BillingLatitude in the schema.
    /// </summary>
    public virtual global::System.Nullable<double> BillingLatitude
    {
        get;
        set;
    }

Pinturiccio
Devart Team
Posts: 2314
Joined: Wed 02 Nov 2011 09:44

Re: The property could not be set to a 'null' value

Post by Pinturiccio » Mon 10 Sep 2018 12:19

This is a known issue. We have already fixed it.
The bug with code generation for nullable properties for EF1/EF4/EF5/EF6 is fixed
Code generated for nullable properties is simplified: now T? is generated instead of System.Nullable<T>

We will post here when the corresponding build of Entity Developer is available for download.

Pinturiccio
Devart Team
Posts: 2314
Joined: Wed 02 Nov 2011 09:44

Re: The property could not be set to a 'null' value

Post by Pinturiccio » Wed 12 Sep 2018 13:53

We are planning to release a new public build of Entity Developer at the end of the next week. You can downgrade to a previous public build. Or, if you are interested, we can send you an internal build with the fix. Please send us the license number or email, for which Entity Developer were purchased.

Pinturiccio
Devart Team
Posts: 2314
Joined: Wed 02 Nov 2011 09:44

Re: The property could not be set to a 'null' value

Post by Pinturiccio » Thu 20 Sep 2018 13:18

New build of Entity Developer 6.3.582 is available for download!
It can be downloaded from https://www.devart.com/entitydeveloper/download.html (trial version) or from Customer Portal (for users with valid subscription only).
For more information, please refer to viewtopic.php?t=37707

Post Reply