Default value for identity/computed properties in 6.50.250.0

Default value for identity/computed properties in 6.50.250.0

Postby bakgerman » Thu 08 Dec 2011 17:12

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.
bakgerman
 
Posts: 5
Joined: Thu 08 Dec 2011 04:54
Location: Dublin, OH

Postby Shalex » Fri 09 Dec 2011 15:55

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:
Code: Select all
  var config = OracleEntityProviderConfig.Instance; 
  config.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.InsertDefaultOrNull;

The new (6.60.258) version of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby bakgerman » Mon 12 Dec 2011 22:54

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:
Code: Select all
  var config = OracleEntityProviderConfig.Instance; 
  config.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.InsertDefaultOrNull;

The new (6.60.258) version of dotConnect for Oracle is available for download.


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.
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.
bakgerman
 
Posts: 5
Joined: Thu 08 Dec 2011 04:54
Location: Dublin, OH

Postby Shalex » Wed 14 Dec 2011 08:26

We have reproduced the problem and are investigating it.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby bakgerman » Wed 14 Dec 2011 22:38

Shalex wrote:We have reproduced the problem and are investigating it.


Great, thanks, much appreciated
bakgerman
 
Posts: 5
Joined: Thu 08 Dec 2011 04:54
Location: Dublin, OH

Postby Shalex » Fri 16 Dec 2011 11:38

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.
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44

Postby bakgerman » Fri 16 Dec 2011 15:30

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.


Thank you very much. :) Regression defects are annoying but a fact of life. Your support is very quick in its turnaround time.
bakgerman
 
Posts: 5
Joined: Thu 08 Dec 2011 04:54
Location: Dublin, OH

Postby Shalex » Thu 22 Dec 2011 17:18

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 .
Shalex
Devart Team
 
Posts: 7530
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle