dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Dennis Wanke
Posts: 57
Joined: Tue 11 Mar 2014 07:49

dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Post by Dennis Wanke » 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:

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>
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:

Code: Select all

CREATE TABLE "InvoiceLines"  ( 
    "InvoiceId" NUMBER(10) NOT NULL,
    "LineId" NUMBER(10) NOT NULL,
    PRIMARY KEY ("InvoiceId", "LineId")
)
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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Post by Shalex » Fri 14 Mar 2014 16:48

We have reproduced the problem with generating DDL for the Identity property which is a part of composite entity key when working with EDM Wizard / Designer. We will notify you when it is fixed.

As a workaround, please use Entity Developer.

We recommend using Entity Developer (the Devart Entity Model item, *.edml) instead of EDM Wizard/Designer (the ADO.NET Entity Data Model, *.edmx) because Entity Developer has a lot of advantages: http://www.devart.com/entitydeveloper/ed-vs-edm.html.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Post by Shalex » Wed 26 Mar 2014 15:31

The bug with generating DDL for the Identity property, which is a part of composite entity key, in run-time (Code-First CreateDatabase(), Code-First Migrations) and design-time (EDM Designer) is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Post by Shalex » Thu 27 Mar 2014 16:07

New build of dotConnect for Oracle 8.3.125 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=29243.

Dennis Wanke
Posts: 57
Joined: Tue 11 Mar 2014 07:49

Re: dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Post by Dennis Wanke » Thu 27 Mar 2014 18:34

I confirm the issue is fixed in the build 8.3.125.0

Post Reply