dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"
Posted: Tue 11 Mar 2014 08:04
We are evaluating dotConnect for Oracle for using it with our product as one of the data providers backing our data access layer, powered with Entity Framework 5.0. So far, we’ve encountered several issues with dotConnect, some of them being real show-stoppers. We are using the latest version of dotConnect for Oracle (8.3.115) in Direct Mode and targeting two versions of Oracle Database: 11g and 12c.
The most severe showstopper concerns the generation of a database structure or the corresponding script. Consider the following SSDL type definition:
Note the property LineId is marked with StoreGeneratedPattern="Identity" and is a part of a composite entity key.
In this case, the attribute StoreGeneratedPattern="Identity" has no effect when generating a corresponding table/script: neither GENERATED ALWAYS AS IDENTITY (Oracle 12) nor a sequence + trigger pair (Oracle 11) is generated for this type - either in runtime using CreateDatabase/Script() or in design-time using Devart T4 transform:
It is not a limitation of the Oracle Database itself, because the missed constructs can be manually created and everything works as it should. The IDENTITY column is also created automatically with both SQL Server and SQL Server Compact data providers.
Please confirm that it is a bug in dotConnect for Oracle and provide some estimation if it can (and is going to be) fixed in the coming releases. Your answer will help us making a decision about adopting your provider for our product.
The most severe showstopper concerns the generation of a database structure or the corresponding script. Consider the following SSDL type definition:
Code: Select all
<EntityType Name="InvoiceLines">
<Key>
<PropertyRef Name="InvoiceId" />
<PropertyRef Name="LineId" />
</Key>
<Property Name="InvoiceId" Type="int" Nullable="false" />
<Property Name="LineId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
</EntityType>
In this case, the attribute StoreGeneratedPattern="Identity" has no effect when generating a corresponding table/script: neither GENERATED ALWAYS AS IDENTITY (Oracle 12) nor a sequence + trigger pair (Oracle 11) is generated for this type - either in runtime using CreateDatabase/Script() or in design-time using Devart T4 transform:
Code: Select all
CREATE TABLE "InvoiceLines" (
"InvoiceId" NUMBER(10) NOT NULL,
"LineId" NUMBER(10) NOT NULL,
PRIMARY KEY ("InvoiceId", "LineId")
)
Please confirm that it is a bug in dotConnect for Oracle and provide some estimation if it can (and is going to be) fixed in the coming releases. Your answer will help us making a decision about adopting your provider for our product.