Entity Framework generates invalid oracle sql.

I have similar tables:
create the table ParameterSets
(
Identification number (10, 0) not null,
Name nvarchar2 (50) not null,
primary key constraint ParameterSet_PK (Id)
);

Create the table settings
(
Identification number (10, 0),
Name nvarchar2 (50).
Number of ParameterSetId (10, 0) not null,
primary key constraint Parameters_PK (Id),
Constraint Parameters_ParamSet_FK foreign key (ParameterSetId) makes reference to ParameterSets (Id)
);

create table user groups
(
Identification number (10, 0) not null,
Name nvarchar2 (50) not null,
Number of ParameterSetId (10, 0) not null,
primary key constraint UserGroups_PK (Id),
Constraint UserGroups_ParamSet_FK foreign key (ParameterSetId) makes reference to ParameterSets (Id)
);

create table users
(
ID number (10,0) not null,
GroupId number (10,0) not null,
Name nvarchar2 (50) not null,
primary key constraint Users_PK (Id),
Constraint Users_Groups_FK foreign key (GroupId) made reference to UserGroups (Id)
);

And I want to do a join between these tables by using this statement:

application of var = u into entities. Users.Include ("UserGroup.ParameterSet.Parameters")
where u.Id == 1
Select u;

var user = query. SingleOrDefault();

It's very simple Linq, but it generates invalid SQL Oracle that contains OUTER APPLY.
I found that there is a bug to Microsoft for this, but can it be fixed by the Oracle provider?
At the end which layer generates MS SQL final (EF) or ODP (the provider)?
because "sql query" generates invalid SQL but adds completely SingleOrDefault code Oracle «rownum < 2"»

The sql is:
SELECT
"Project1". "" ID2 "AS"ID. "
"Project1". ' ' ID ' AS 'ID1 ',.
"Project1". "' GROUPID ' LIKE 'GROUPID ',.
"Project1". "" NAME "AS"NAME. "
"Project1". "" ID1 "LIKE"ID2 ",.
"Project1". "" NAME1 "AS"NAME1"
"Project1". "" PARAMETERSETID "AS"PARAMETERSETID. "
"Project1". "" ID3 "AS"ID3"
"Project1". "' NAME2 ' AS 'NAME2 ',.
"Project1". "" C1 "AS"C1"
"Project1". "" ID4 "AS"ID4,"
"Project1". "" NAME3 "AS"NAME3"
"Project1". "' PARAMETERSETID1 ' AS 'PARAMETERSETID1 '.
(SELECT
"Filter1". "" ID1 "AS"ID. "
"Filter1". "' GROUPID ' LIKE 'GROUPID ',.
"Filter1". "' NAME1 ' AS 'NAME',
"Filter1". "' ID2 ' AS 'ID1 ',.
"Filter1". "' NAME2 ' AS"NAME1"
"Filter1". "" PARAMETERSETID1 "AS"PARAMETERSETID. "
"Filter1". "" ID3 "LIKE"ID2 ",.
"Filter1". "" ID4 "AS"ID3"
"Filter1". "' NAME3 ' AS 'NAME2 ',.
"Filter2. "" ID5 "AS"ID4,"
"Filter2. "" NAME4 "AS"NAME3"
"Filter2. "" PARAMETERSETID2 "AS"PARAMETERSETID1. "
BOX WHEN ('Filter2". ("" ID5 "IS NULL) NULL THEN 1 OTHER END AS"C1 ".
FROM (SELECT "Extent1". ' ' ID ' AS 'ID1', "Extent1". "' GROUPID ' LIKE"GROUPID","Extent1 ". "" NAME "AS"Name1","Extent2. ' ' ID ' AS 'ID2', 'Extent2. "' NAME ' AS 'Name2', 'Extent2. "' PARAMETERSETID ' AS 'PARAMETERSETID1', 'Extent3 '. ' ' ID ' AS 'ID3', 'Extent3 '. "" NAME "AS"name5', 'Extent3 '. "' PARAMETERSETID ' AS 'PARAMETERSETID3', 'Extent4 '. ' ' ID ' AS 'ID4', 'Extent4 '. "" NAME "AS"NAME3 ".
"CLAUDY. "" USERS ""Extent1 ".
INNER JOIN "CLAUDY. "' USER groups '"Extent2"ON"Extent1 ". "' GROUPID ' = 'Extent2. "" IDENTITY CARD ".
LEFT OUTER JOIN "CLAUDY. "' USER groups '"Extent3"ON"Extent1 ". ' ' GROUPID ' = 'Extent3. ' "" IDENTITY CARD ".
LEFT OUTER JOIN "CLAUDY. "" PARAMETERSETS ""Extent4"ON"Extent3 ". "" PARAMETERSETID "="Extent4. " "" IDENTITY CARD ".
WHERE (1 = "Extent1". ((' ' ID ')) "Filter1".
OUTSIDE APPLY (SELECT "Extent5". "" ID "AS"ID5","Extent5 ". "" NAME "AS"Conjoint4","Extent5 ". "' PARAMETERSETID ' AS 'PARAMETERSETID2', 'Extent6 '. ' ' ID ' AS 'ID6', 'Extent6 '. "" NAME "AS"NAME6', 'Extent6 '. "' PARAMETERSETID ' AS 'PARAMETERSETID4 '.
"CLAUDY. "" PARAMETERS ""Extent5. "
INNER JOIN "CLAUDY. "' USER groups ' 'Extent6' ON 'Extent6 '. "" PARAMETERSETID "="Extent5. " "" PARAMETERSETID ".
WHERE ("Filter1". ' ' GROUPID ' = 'Extent6. ' ((' ' ID ')) 'Filter2.
) "Project1".
ORDER BY "Project1". "' ID2 ' ASC, 'Project1 '. ' ' ID ' ASC, 'Project1 '. "' ID1 ' ASC, 'Project1 '. "" ID3 "CSA"Project1 ". ' ' C1 ' ASC

I think shame is for the EF team - this query is simple join between four tables.
Select * from users u
UG ug = u.groupid left join user groups. ID
left join ParameterSets on ug.parametersetid = ps.id ps
a left join parameters p ps.id = p.parametersetid
where u.id = 1

Oracle 12 c and 12 c ODP.NET database are now supported by APPLYING a lateral view. As long as you use these versions or above, you will see is no longer this LINQ error generated in your applications.

As described above, to support to APPLY necessary to change the Oracle SQL dialect in order to accommodate the LINQ query generation.

Tags: Database

Similar Questions

  • Partitions don't synchronize only not - Oracle SQL Developer 4.1.3.20

    Hello

    First of all, thanks a lot for developers for this great tool.

    I use the Data Modeler which comes with Oracle SQL Developer 4.1.3.20.

    In the 12 c database, I created the following table:

    CREATE

    TABLE MMOURA. TEST_TABLE

    (

    NUMBER OF ID_TEST_TABLE (10) NOT NULL

    DATE_TEST_TABLE DATE NOT NULL

    )

    ORGANIZATION HEAP PCTFREE 10

    LOGGING NOCOMPRESS NO INMEMORY

    NOCACHE NOPARALLEL NOROWDEPENDENCIES DISABLE THE MOVEMENT OF THE LINE;

    I import with Data Modeler and add the partition:

    CREATE

    TABLE MMOURA. TEST_TABLE

    (

    NUMBER OF ID_TEST_TABLE (10) NOT NULL

    DATE_TEST_TABLE DATE NOT NULL

    )

    ORGANIZATION HEAP PCTFREE 10 TABLESPACE SYSTEM NOT LOGGING NOCOMPRESS NO INMEMORY RANGE PARTITION

    (

    DATE_TEST_TABLE

    )

    INTERVAL OF

    (

    NUMTOYMINTERVAL (1, 'MONTH')

    )

    (

    PARTITION P_BEFORE_2010 VALUES LESS THAN (TO_DATE (JANUARY 1, 2010 ',' DD/MM/YYYY "")) NOCOMPRESS

    )

    NOCACHE NOPARALLEL NOROWDEPENDENCIES DISABLE THE MOVEMENT OF THE LINE;

    So I can create a partition and generates the correct code.

    I click on "Synchronize data dictionary with model" and see the differences with the model and the database.

    In the models 'compare', 'Physical Details' is red. 'Partition' is red, "Selected" are marked, "Source table: TEST_TABLE ' is YES and" target Table: TEST_TABLE "is no.

    "Partitioning" is marked, and I can see the new partition "P_BEFORE_2010."

    teste_partition_chamado_oracle.png

    But when I click on 'Overview of DOF', theres no changes:

    -Generated by Oracle SQL Developer Data Modeler 4.1.3.901

    -in: 2016-01-14 14:19:50 BRST

    -site: database Oracle 12 c

    -type: Oracle Database 12 c

    -Oracle SQL Developer Data Model Summary Report:

    --

    -CREATE TABLE 0

    -CREATION OF INDEX 0

    ...

    ...

    In the tool preferences, model, synchronization, it is marked:

    FUNCTION

    PACKAGE

    PROCEDURE

    ROLE

    SEQUENCE

    SYNONYM

    TABLESPACE

    In "Import Options", it is marked:

    Partitions

    Triggered

    What I am doing wrong? Is this some sort of bug?

    Hi Marcio,

    I'm afraid that data Modeler does not "DOF Preview" statements for changes in the distribution.

    Kind regards

    David

  • x 64 application entity Framework using Oracle.DataAccess.Client

    I am trying to build a x 64 application Entity Framework using the current Oracle.DataAccess.Client.  I can launch the application as Any CPU and x 86 using the managed provider, but when I compile for x 64, I get the error below when running. If I change the provider to Oracle.ManagedDataAccess.Client it works with x 86 and x 64 compiler.  Unfortunately, we are unable to use the managed provider until the xml is supported.  I have two clients x 86 and x 64 installed.  Any ideas?

    System.Data.EntityException was not handled

    HResult =-2146233087

    Message = the underlying provider failed to open.

    Source = System.Data.Entity

    StackTrace:

    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)

    at System.Data.EntityClient.EntityConnection.Open)

    at System.Data.Objects.ObjectContext.EnsureConnection)

    to System.Data.Objects.ObjectContext.SaveChanges (SaveOptions options)

    at System.Data.Entity.Internal.InternalContext.SaveChanges)

    at System.Data.Entity.Internal.LazyInternalContext.SaveChanges)

    at System.Data.Entity.DbContext.SaveChanges)

    at EntityFramework1.EFTest.AddItem (c:\TFS2012\AD). NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFramework1\EFTest.cs:line 21

    at EntityFrameworkConsole.Program.Main (String [] args) in c:\TFS2012\AD. NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFrameworkConsole\Program.cs:line 12

    at System.AppDomain._nExecuteAssembly (RuntimeAssembly assembly, String [] args)

    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly)

    at System.Threading.ExecutionContext.RunInternal (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

    at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

    at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)

    at System.Threading.ThreadHelper.ThreadStart)

    InnerException: Oracle.DataAccess.Client.OracleException

    HResult =-2147467259

    Message =""

    ErrorCode =-2147467259

    StackTrace:

    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper (Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx * pOpoSqlValCtx, ByVal src, String procedure, Bcheck Boolean, Int32 isRecoverable)

    at Oracle.DataAccess.Client.OracleException.HandleError (Int32 errCode, OracleConnection conn, IntPtr, Object src opsErrCtx)

    at Oracle.DataAccess.Client.OracleConnection.Open)

    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)

    InnerException:

    Here is my web.config (less sensitive information):

    <? XML version = "1.0" encoding = "utf-8"? >

    < configuration >

    < configSections >

    < section name = "EF" type = "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, Entity Framework, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' requirePermission ="false"/ >"

    < / configSections >

    < Entity Framework >

    < defaultConnectionFactory type = "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, Entity Framework" >

    < Parameters >

    < setting = "v11.0" / >

    < / Parameter >

    < / defaultConnectionFactory >

    < / Entity Framework >

    < connectionStrings >

    < add name = 'Entities' connection string connectionString="metadata=res://*/Models.EFEntities.csdl|res://*/Models.EFEntities.ssdl|res://*/Models.EFEntities.msl;provider=Oracle.DataAccess.Client;provider = & quot; data source = DATASOURCE; password = PASSWORD; persist info security = True; user ID = username & quot; "" ProviderName "/ >

    < / connectionStrings >

    < / configuration >

    Alex,

    Finally, we have solved the problem.  It turns out that we had a bad x 64 home path in the PATH variable.  I lost track of what it was originally, but I'm sure the x 64 bin path was correct. I did not notice that it was wrong, until I tried to install the full client and began to see an error indicating that it was missing a dll.  This led me to a post on the forum, in which you indicated that the PATH variable has not been set (ODAC 12 c for xcopy issues).  In our case, it is not missing, just fake.

    This is the behavior that we see if the PATH variable for the home directories and bin is incorrect:

    • Full client: an error of external system (no exceptions).  The error message is that the oraons.dll is missing.
    • XCOPY customer: generates an exception without error message.  The Exception.Message property is empty and there is no inner exception.

    Can the ODP team can add a meaningful message for this exception?  If the exact error cannot be highlighted during execution, a generic name on the path audit would help enormously.  I must have looked at it a dozen times and didn't notice that it was false.  If I had no idea that this could be the cause, it would be discussed more in detail, or had someone else Verify that it was correct.  I hope that we would have solved much earlier.

    Thank you.

  • Generation of entity - relationship with Oracle SQL Developer.

    Is it possible to generate an entity - diagram of the relationships of Oracle SQL Developer?

    Thanks in advance,
    Jaime.

    If you are willing to pay the 3000 quid per head (+ annual support costs), take a look at [Oracle SQL Developer Data Modeling | http://www.oracle.com/technology/products/database/datamodeler/index.html].

    Have fun
    K.

  • How to automatically generate associations in the EDMX using Entity Framework 'database first'?

    Hello.  I'm new on Entity Framework and the database that I connect Oracle 10 g.  I develop using Visual Studio 2015, ODAC 12 c version 4 with the installed Visual Studio Tools and EF 6.1.3.  I am generation an EDMX model from an existing database.  In the Visual Studio wizard, I select the existing tables that have relationships of foreign key between them.  The resulting EDMX contains the tables and their columns, but no association.  I tried to do this using the code first of all existing database Wizard, and the results are similar: classes for the tables and column properties, but still no association or the properties of a class to contain instances of another.  Should I be not expecting associations to be created automatically?  Is there something I missed?

    I'm back in it and found out what the problem was.  Before you create the entity data model, I had to have the connection already defined in Server Explorer * using the ODP.NET* provider.

  • Facing the question Entity framework with Oracle 11 g using MVC 4 connecting

    Hello

    I am trying to connect to Oracle through Entity Framework data.

    I created two projects

    ((1) one for the project Web MVC4 access data) 2.

    It works fine if I am trying to connect using the console Application and App.config, but facing the question trying to connect using we.config and the web application.

    I added using Nuget packages in data access project.

    I made reference to this dll aaccess of data in the web project and try to call the oracle connection.

    Package.config:

    < Package >

    < package id = "EF" version = "6.0.2" targetFramework = "net45" / >

    < package id = "odp.net.x64" version = "112.3.20" targetFramework = "net45" / > "

    < package id = "Oracle.ManagedDataAccess" version = "12.1.021" targetFramework = "net45" / > "

    < package id = "Oracle.ManagedDataAccess.EntityFramework" version = "12.1.021" targetFramework = "net45" / > "

    < / packages >

    Web.Config:

    < configuration >

    < configSections >

    <!-for more information on the configuration of the Entity Framework, visit http://go.Microsoft.com/fwlink/?LinkId=237468 ->

    < section name = "EF".

    type = 'System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, Entity Framework, Version = 6.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089'

    requirePermission = "false" / >

    "< name =" article oracle.manageddataaccess.client"type =" OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342 "/ >

    < / configSections >

    < connectionStrings >

    < clear / >

    < name = "OracleDbContext" providerName = "Oracle.ManagedDataAccess.Client"

    connectionString ="Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = host address)(PORT=1521)) (CONNECT_DATA = (SERVICE_NAME = oracle))); User = username ID; Password = pwd; "/ >

    < / connectionStrings >

    < Entity Framework >

    <!-< defaultConnectionFactory type = "System.Data.Entity.Infrastructure.SqlConnectionFactory, Entity Framework" / >-->

    < defaultConnectionFactory type = "Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" > "

    < / defaultConnectionFactory >

    <>providers

    < invariantName = "Oracle.ManagedDataAccess.Client provider"

    Type = "Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version = 6.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / >

    < invariantName = "System.Data.SqlClient provider" type = "System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" / > "

    < / providers >

    < / Entity Framework >

    < system.data >

    < DbProviderFactories >

    < remove invariant = "Oracle.ManagedDataAccess.Client" / > "

    "< add name =" ODP.NET, successful pilot"invariant =" Oracle.ManagedDataAccess.Client "description ="Oracle Data Provider for.NET, successful pilot"type =" Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342"/ >"

    < / DbProviderFactories >

    < system.data >

    < runtime >

    < assemblyBinding xmlns = "urn: schemas-microsoft-com: ASM.v1" >

    < dependentAssembly >

    < publisherPolicy apply = "no" / >

    < name = "Oracle.ManagedDataAccess assemblyIdentity" publicKeyToken = "89b483f429c47342" culture = "neutral" / > "

    < / dependentAssembly >

    < / assemblyBinding >

    < / SPAN >

    < oracle.manageddataaccess.client >

    < version number = "*" >

    < dataSources >

    < alias dataSource = "OracleDbContext" descriptor = "(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=hostname) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = oracle)));" User = username ID; Password = pwd; "/ >

    < / dataSources >

    < / version >

    < /oracle.manageddataaccess.client >

    < / configuration >

    I am facing the sub question:

    Provider of the type EF ' Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version = 6.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342 "in the application for the vendor configuration file ADO.NET with invariant name 'Oracle.ManagedDataAccess.Client' could not be loaded." Make sure that the qualified assembly name is used and that the assembly is available in the currently running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

    Hello

    I tried with what follows and it started working.

    I just pointed out that line of defaultConnectionFactory in the web.config file

    Type = "Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework, Version = 6.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / > "

    .

  • Entity Framework Code-First and Oracle 11g

    Entity Framework Code First migration is supported on Oracle 11 g Server?  In general, is the last ODAC 12 c backward compatible and will work correctly with 11g?

    Thank you.

    The answer is Yes to both questions.

  • java.sql.SQLException: invalid Oracle URL specified

    Dear all,

    I am writing a simple java class to access resources human schema data tables but always I get the same error:

    java.sql.SQLException: invalid Oracle URL specified

    Here it is the settings used by me:

    DriverManager.getConnection ("jdbc:oracle:thin@localhost:1521/XE","hr","hr")

    the driver being used is oracle.jdbc.driver.OracleDriver

    the used container is ojdbc14.jar is

    Any help on this would be much appreciated.

    Thanks in advance

    Your question is not related to 10g Express Edition... This is related to Java.

    If Please edit this thread and change the subject "Please ignore" and ask your question in the appropriate forum of Java.

    Thank you.

  • Oracle generates invalid WSDL

    Hi, guys!
    I use XML DB native Web Services of the project.
    The type of input parameters for my duties are "Object Types".
    But when I have an attribute in one object type to another object, the wsdl document which generates the Oracle is not valid.

    CREATE or REPLACE TYPE name_tp AS OBJECT)
    first name varchar2 (20).
    ......)

    CREATE or REPLACE TYPE person_tp AS OBJECT)
    name_tp person_name,
    .......)

    create or replace function test (p_person person_tp)
    ......

    When I have this situation, the wsdl file is not valid, because Oracle generates sth like this
    < xsd: element name = "person_name" type = "name_tp" / >
    Instead of
    < xsd: element name = "person_name" type = "tns:name_tp" / >

    How can any ideas, I solve this problem?

    Which is profound,
    Slavi

    The problem with the type being is not in the correct namespace is bug 8274288. You need to upgrade to 11.2.0.1.0 or contact support and ask for a single patch for this bug.

  • Entity Framework stored procedure Mapping - OUT unrecognized parameter

    I use the following software:

    • ODP.NET 12 c Release 3
    • Entity Framework 6
    • Visual Studio 2013, SP3
    • Oracle 11g Server

      I created a package containing a stored procedure to update a row in a table.  The procedure is an OUT parameter (named ROWS_AFFECTED) which returns the number of rows affected.

      CREATE OR REPLACE PACKAGE BODY TST. Customer_Procs
      AS
      PROCEDURE Update_Customer
      (
      CUST_ID IN NUMBER,
      WHAT IN VARCHAR2,
      L_NAME IN VARCHAR2,
      EMAIL IN VARCHAR2,
      LAST_UPDATE TIMESTAMP IN
      ROWS_AFFECTED NUMBER
      )
      AS
      BEGIN
      UPDATE
      TST. CUSTOMER
      SET
      NAME = WHAT,.
      LAST_NAME = L_NAME,
      EMAIL_ADDR = EMAIL,
      LAST_UPDT_TIME = CURRENT_TIMESTAMP
      WHERE
      CUSTOMER_ID = CUST_ID
      AND LAST_UPDT_TIME = LAST_UPDATE;

      ROWS_AFFECTED: = NUMBER OF ROWS SQL %;

      END Update_Customer;


      I executed successfully the stored procedure in SQL * more.  The ROWS_AFFECTED OUT parameter is filled with the good

      value.

      I imported the stored procedure in my Entity Framework model using the function successfully import.

      I then traced the parameters of the stored procedure to my entity properties. The ROWS_AFFECTED parameter is shown in the stored procedure mappings, but the "rows affected parameter" check box is cleared.

      Attempt to run my results in the following exception being throw:
      "CustomerModel.msl (22,12): error 2047: a mapping liaison function specifies a function.

      CustomerModel.Store.CUSTOMER_PROCS_UPDATE_CUSTOMER with a parameter not supported: ROWS_AFFECTED. Output parameters cannot

      be mapped through the RowsAffectedParameter property. Use the result links to return values from a function call.

      I am trying to determine what I need to do in order to have the Entity Framework to recognize the ROWS_AFFECTED OUT parameter in the

      stored procedure chart for concurrency control.

      I found a solution: try to declare ROWS_AFFECTED such as 'PLS_INTEGER' instead of 'NUMBER '.  This solved it for me.

    • Could not import the Pentecost Entity Framework stored procedures

      Hi, I have a problem with Entity Framework 5 and stored procedures. I can add stored procedures to mi with "Update Wizard" solution, but them does not show in the Model Explorer and I can't use my code. I have ODAC 12 c Release 2 installed in my pc.

      There is a bug in the database Oracle 12 c that occurs only with a snap-in database. It is fixed in the next group of patches from database. (bug #17448545)

      There are three workarounds in the meantime:

      (1) to re-create the database without the shared option (no plug-in database)

      (2) install your schema in the database of the container instead of a snap-in database. You will need a user name as C ##HR to do. It is not advisable on a production database.

      Add 3) the section of manually in in the edmx file. Note that this is deleted when you "Generate database from model" or "Update model from database".

      for example:

      ...

      ParameterTypeSemantics = "AllowImplicitConversion" scheme = "SCOTT" >

    • TPT entity framework does not--&gt; showstopper

      Greetings,

      I am facing a similar problem that is described here:

      [EF and legacy - EF Possible bug?: http://stackoverflow.com/questions/11506683/entity-framework-and-inheritance-possible-bug-in-ef.]

      I use:

      Windows 7 64 bit
      ODAC 11.2 Release 5 32 bit
      Oracle 11.2 Express on localhost
      Visual Studio 2012
      Framework of the entity 5.0
      .NET 4.5

      Create a simple database with TPT inheritance:


      CREATE TABLE person)
      ID NOT NULL, NUMBER (38, 0)
      Name VARCHAR2 (50).
      PK100 CONSTRAINT PRIMARY KEY (Id)
      )
      ;
      CREATE TABLE Employee)
      ID NOT NULL, NUMBER (38, 0)
      JobTitle VARCHAR2 (50).
      PK101 CONSTRAINT PRIMARY KEY (Id)
      )
      ;
      ALTER TABLE Employees ADD CONSTRAINT ref_Employee_person
      FOREIGN KEY (Id)
      REFERENCE Person (Id)
      ;
      CREATE TABLE Superhero)
      ID NOT NULL, NUMBER (38, 0)
      Superpower VARCHAR2 (50).
      PK102 CONSTRAINT PRIMARY KEY (Id)
      )
      ;
      ALTER TABLE ADD CONSTRAINT of superhero ref_Superhero_person
      FOREIGN KEY (Id)
      REFERENCE Person (Id)
      ;
      -Sequence
      CREATE SEQUENCE seq_id
      INCREMENT BY 1
      START BY 55
      MINVALUE 1
      MAXVALUE 9999999999999999999999999999
      NOCYCLE
      ALL
      CACHE 20
      /
      CREATE OR REPLACE TRIGGER PERSON_BI BEFORE INSERT ONE PERSON FOR EACH LINE
      BEGIN IF: NEW.ID IS NULL, THEN SELECT SEQ_ID. NEXTVAL INTO: DOUBLE NEW.ID; END IF; END;
      /

      Create a console application, add an edmx file, set up heritage as follows:

      Diagram

      And I put the Id property of the Person as StoreGeneratedPattern entity identity

      Next, I created the following program:


      public static void Main (string [] args)
      {
      Employee
      var db = new Entities();
      EMPLOYEE e = new EMPLOYEE() {ID = 0, JOBTITLE = 'Programmer'};
      e.NAME = 'John Doe regular';
      DB. People.Add (e);
      Superhero
      Superhero s = new SUPERHERO();
      s.NAME = "Superman";
      s.SUPERPOWER = "flight."
      DB. People.Add (s);
      DB. SaveChanges();

      Search all people and look at the guy
      This is where I get an error:
      var allPeople DB. People.ToList ();

      allPeople.ForEach (x = > Console.WriteLine ("type:" + x.GetType ()));

      }

      This will raise the following error when I extract in allPeople:


      All objects of the 'Entities.People' EntitySet must have unique primary keys. However, an instance of the type "TestingTPTInheritance.EMPLOYEE" and an instance of type 'TestingTPTInheritance.SUPERHERO', both have the same primary key value, ' EntitySet = people. ID = 38'.


      Looking at the database, everything seems fine

      -Table of the person-
      ID NAME
      39 regular John Doe
      40 superman

      -Employee table-
      ID JOBTITLE
      Programmer 39

      -Table of superheroes-
      SUPERPOWER ID
      Flight 40

      If I select it that EF generates in "db. People.ToList (); "and run I get the following result:

      C1 C2 C3 C4 NAME
      0X0X 40 Superman
      0X0X 39 John Doe regular programmer

      Is this a bug in ODAC. If even there is a work around or will there be a fix soon?

      Published by: Amplus on 7.11.2012 07:59

      Given our generated queries are slightly different (for example CASTs on the ID column and the order of the columns in the SELECT list).
      the result of the query should be logically even.
      I ran the query generated from you on my 11.1 database, and the result is below.

      C1 C2 C3 C4 NAME
      0X1X Superman flight 66
      0X0X 65 John Doe regular programmer

      You see the 'theft' is not absent from the line of "Superman."

      If you run the generated query me on your database Oracle Express 11.2 and 'Theft' is still missing, then we
      don't know there is difference between the two databases that we use.
      The error that you got may be linked to this difference. You can confirm by trying with other Oracle database
      other than an Express database.
      Be sure to replace "SCOTT" with "TRP" in the generated query me.

    • Entity Framework no longer works! Help, please!

      Hello
      I did an apprenticeship with the help of EF4.1.0.0 and the new ODAC for the Entity Framework. I've been using Add new item in my project of MVC3 to add my database entities. I can select ADO.NET Entity Data Model and then I get the wizard dialog box for "select the template content". When I select "Create database" and press Next the next dialog box choose your connection comes sometimes, sometimes not--but in both cases the dialog box disappears, and there is no more to do. I tried to leave VS2010 ultimate and start over with a new project. The same problem. I tried to restart my pc and the same problem. VS2010 (which is a major pain) I uninstalled and reinstalled with SP1. However, the wizard is broken when selecting "Create database". I uninstalled the ODAC and rebooted and VS2010 and the Assistant EF works properly again (of course not for Oracle). I reinstalled the ODAC and tried again and the wizard explodes on her generate database. I can do anything is no longer working with ODAC.
      Has anyone of another seen elsewhere or knows how to solve this problem? This looks like a bug to me.

      Any suggestion would be appreciated!
      Kind regards
      Bill44077

      I think that you are facing a known issue. See this existing post:
      Beta Vesrion ODP.NET with Entity Framework support
      You need to scroll up to the Center to see your problem that is described in the same way and then I post that Oracle suspects that it is a known problem with Visual Studio.

      An easy way to check if you have the same problem is to ensure that the first connection in Server Explorer is able to connect to a database. Not the first Oracle, the first connection connection to what either in Server Explorer. Once you verify that the first connection can connect, and rerun the EDM Wizard with Oracle. If it works now, it's the same question.

      This problem occurs with all providers of DB, Oracle not only. It's probably a generic problem with VS 2010 that MS would need to correct. However, the workaround is easy to use that it should not be a showstopper by using EF.

    • Is it possible to combine Entity Framework 6 with ODAC 11 g within Visual Studio 2015?

      The .NET application, I want to develop will be deployed on a server with the customer Oracle 11 g used to access a back-end 10g database.  I would use the possible latest technologies which can still fulfil this obligation.

      Is it possible, therefore, to combine Entity Framework 6 with ODAC 11 g (or develop using 12 c, but deploy to an application server running 11 g)?  Should I strictly use ODP.Net Oracle libraries to do this?  I'm hoping to use Visual Studio 2015 (about to be released).

      If this is not possible, what are my options?

      Only ODP.NET 12.1.0.2 in ODAC 12 c R3 and higher is certified with EF 6. You must use a client of 12 c. However, you can still access a 10.2 this customer DB server.

    • SEVERE: Exception initialization 'oracle.dbtools.crest.fcp.DataModelerAddin' extension ' Oracle SQL Developer Data Modeling

      After some testing today with a new installation and plugin subversion in the latest edition of data Modeler this error happens with every start of the tool.

      Have removed and unzipped the installation once again without changing the error.

      After that, I started with another user on my computer, it the error does not occur.

      Is there a system folder to remove the configuration of my personal like jdeveloper and sql developer?

      I lose the most important features, for example. have no browser and cannot open a design.

      Here is the full error stack:

      29 may 2015 22:17:40 oracle.ideimpl.extension.AddinManagerImpl

      SEVERE: Exception initialization 'oracle.dbtools.crest.fcp.DataModelerAddin' extension ' Oracle SQL Developer Data Modeling

      java.lang.NullPointerException

      at oracle.dbtools.crest.swingui.editor.UDPLibrariesPersistence.load(UDPLibrariesPersistence.java:220)

      at oracle.dbtools.crest.model.design.DesignSet.createElement(DesignSet.java:56)

      at oracle.dbtools.crest.swingui.ApplicationView.addDesign(ApplicationView.java:2497)

      to oracle.dbtools.crest.swingui.ApplicationView. < init > (ApplicationView.java:435)

      to oracle.dbtools.crest.swingui.ApplicationView. < init > (ApplicationView.java:389)

      at oracle.dbtools.crest.swingui.ApplicationView.getInstance(ApplicationView.java:2258)

      at oracle.dbtools.crest.fcp.DataModelerAddin.initialize(DataModelerAddin.java:553)

      at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManagerImpl.java:496)

      at oracle.ideimpl.extension.AddinManagerImpl.initializeAddin(AddinManagerImpl.java:483)

      at oracle.ideimpl.extension.AddinManagerImpl.initializeAddins(AddinManagerImpl.java:299)

      at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(AddinManagerImpl.java:160)

      at oracle.ideimpl.extension.AddinManagerImpl.initProductAndUserAddins(AddinManagerImpl.java:143)

      at oracle.ide.IdeCore.initProductAndUserAddinsAndActionRegistry(IdeCore.java:2294)

      at oracle.ide.IdeCore.startupImpl(IdeCore.java:1817)

      at oracle.ide.Ide.startup(Ide.java:772)

      at oracle.ide.osgi.Activator.start(Activator.java:209)

      to org.eclipse.osgi.framework.internal.core.BundleContextImpl$ 1.run(BundleContextImpl.java:711)

      at java.security.AccessController.doPrivileged (Native Method)

      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)

      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)

      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)

      at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)

      at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)

      at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)

      at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)

      at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)

      at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)

      at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:271)

      at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:241)

      at org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)

      at org.netbeans.core.netigso.Netigso.start(Netigso.java:191)

      at org.netbeans.NetigsoHandle.startFramework(NetigsoHandle.java:209)

      at org.netbeans.ModuleManager.enable(ModuleManager.java:1352)

      at org.netbeans.ModuleManager.enable(ModuleManager.java:1156)

      at org.netbeans.core.startup.ModuleList.installNew (ModuleList.java:340)

      at org.netbeans.core.startup.ModuleList.trigger (ModuleList.java:276)

      at org.netbeans.core.startup.ModuleSystem.restore (ModuleSystem.java:301)

      at org.netbeans.core.startup.Main.getModuleSystem (Main.java:181)

      at org.netbeans.core.startup.Main.getModuleSystem (Main.java:150)

      at org.netbeans.core.startup.Main.start (Main.java:307)

      at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)

      at java.lang.Thread.run(Thread.java:745)

      Hi Torsten,

      Thanks for reporting the problem. I logged a bug.

      You can view together as "list of system types" directory to "preference > Data Modeler"-probably no longer exists. I guess that the setting for this directory is empty when you start SQL Dev as a different user.

      Philippe

    Maybe you are looking for