Default value for identity/computed properties in 6.50.250.0
Default value for identity/computed properties in 6.50.250.0
Setting the values of identity and computed properties in Ef without triggers, as described here: http://www.devart.com/blogs/dotconnect/?p=5444, does not work in the 6.50.250.0 release. We had to rollback to our previous install of 6.30.202.0 to make this work again. We were getting errors on inserts from oracle stating "Unable to insert NULL into non-nullable [TableName].ADD_DATE" when this was defined as an identity property with a default value of SYSDATE in the EDML file. We use this feature extensively and were able to remove 90% of our triggers. Without this working properly we cannot upgrade. The feature was working before I upgraded to 6.50.250.0, not working (in all cases a default was specified in the EDML file on an identity/computed property, this error was not specific to 1 table), and then worked again after I rolled back to 6.30.202.0. So it seems this is a serious regression in the update.
We cannot reproduce the problem with x.250.
1. Open your *.edml with XML Editor and make sure that your ID column in SSDL has the following attributes:
devart:DefaultValue="SYSDATE" StoreGeneratedPattern="Identity".
2. Configure the EF-provider before creating your context, so that the default values defined in the model are used:
The new (6.60.258) version of dotConnect for Oracle is available for download.
1. Open your *.edml with XML Editor and make sure that your ID column in SSDL has the following attributes:
devart:DefaultValue="SYSDATE" StoreGeneratedPattern="Identity".
2. Configure the EF-provider before creating your context, so that the default values defined in the model are used:
Code: Select all
var config = OracleEntityProviderConfig.Instance;
config.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.InsertDefaultOrNull;
I had already done the data model and the providerConfig as you stated above from the early days on our project, so that wasn't the problem.Shalex wrote:We cannot reproduce the problem with x.250.
1. Open your *.edml with XML Editor and make sure that your ID column in SSDL has the following attributes:
devart:DefaultValue="SYSDATE" StoreGeneratedPattern="Identity".
2. Configure the EF-provider before creating your context, so that the default values defined in the model are used:The new (6.60.258) version of dotConnect for Oracle is available for download.Code: Select all
var config = OracleEntityProviderConfig.Instance; config.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.InsertDefaultOrNull;
The new 6.60 download fixed the columns with SYSDATE filling in as the default value. Thank you.
Nonetheless, the columns with a default value of USER are now not filling in, which I also saw in 6.50 when I manually set the affected Date column to DateTime.Now in the C# code.
So, I think there is an issue with the handling of default values in the data model, at least when it comes to Oracle databases. I will still have to rollback to 6.30 to continue our team's development until this is addressed fully.
Thank you very much. Regression defects are annoying but a fact of life. Your support is very quick in its turnaround time.Shalex wrote:The bug with config.DmlOptions.InsertNullBehaviour for non-EntityKey columns with initialized DefaultValue and StoreGeneratedParttern is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.
New build of dotConnect for Oracle 6.60.268 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22977 .
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22977 .