This project has moved and is read-only. For the latest updates, please go here.

Effort does not check for not null when inserting

Aug 2, 2013 at 11:12 AM
I'm using effort as my test databasae, but when I'm inserting entities I get no error for my columns marked as not null, any ideas?

I'm using EF 5 database first approach on a sql server database, and thanks in advance
Aug 12, 2013 at 9:30 PM

There was a related problem I fixed today, check most recent source or nightly build (130813, not available at the writing of this comment) if it solved your problem.
Sep 13, 2013 at 9:05 AM
I got the latest version form nightly builds using nuget but still have the problem, does my entity model needs to have some special attribute or configuration regarding non nullable columns (beside nullalble="false")?

this is my entity storage model, hope it helps:
 <EntityType Name="Roles">
            <PropertyRef Name="RoleId" />
          <Property Name="RoleId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="32" />
          <Property Name="Display" Type="nvarchar" Nullable="false" MaxLength="32" />
          <Property Name="IsSystem" Type="bit" Nullable="false" />
Oct 23, 2013 at 11:31 AM
Edited Oct 23, 2013 at 11:32 AM
Sorry for the late response.

I am not able to reproduce this. I am using the exact same schema and the following code:
Role role = new Role();
role.IsSystem = false;
role.Display = "display";

ctx.Configuration.ValidateOnSaveEnabled = false;

And I got the following exception:
DbUpdateException:          An error occurred while updating the entries. See the 
                            inner exception for details.
UpdateException:            An error occurred while updating the entries. See the 
                            inner exception for details.
TargetInvocationException:  Exception has been thrown by the target of an invocation.
ContraintException:         Column 'Name' cannot be null. Error code: GenericError
Oct 26, 2013 at 7:28 AM
Thank you for your effort, would you please specify which versions of effort and nmemory your using
Thanks again
Oct 27, 2013 at 10:57 PM
I used 1.0.0-beta4-131023, but I upgraded the test project to 1.0.0-beta5, and it worked too. Entity Framework is 5.0.