dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

dotConnect for Oracle: problem using StoreGeneratedPattern="Identity"

Postby 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.
Dennis Wanke
 
Posts: 57
Joined: Tue 11 Mar 2014 07:49

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

Postby 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
Devart Team
 
Posts: 7616
Joined: Thu 14 Aug 2008 12:44

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

Postby 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
Devart Team
 
Posts: 7616
Joined: Thu 14 Aug 2008 12:44

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

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

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

Postby Dennis Wanke » Thu 27 Mar 2014 18:34

I confirm the issue is fixed in the build 8.3.125.0
Dennis Wanke
 
Posts: 57
Joined: Tue 11 Mar 2014 07:49


Return to dotConnect for Oracle