An EF bug in ODAC 11.2.0.2.30 Beta Entity Framework

use the following script to create table
CREATE TABLE MYSCHEMA.INV
INVOICENO NUMBER(38),
NAME CHAR(10 BYTE)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE TABLE MYSCHEMA.INVDETAIL
INVDETAILID NUMBER(38),
INVNO NUMBER(38),
QTY NUMBER(38),
AMT NUMBER(38)
TABLESPACE USERS
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
ALTER TABLE MYSCHEMA.INV ADD (
PRIMARY KEY
(INVOICENO));
ALTER TABLE MYSCHEMA.INVDETAIL ADD (
PRIMARY KEY
(INVDETAILID));
ALTER TABLE MYSCHEMA.INVDETAIL ADD (
CONSTRAINT INVDETAIL_R01
FOREIGN KEY (INVNO)
REFERENCES MYSCHEMA.INV (INVOICENO));
Use the following linq to query data
var context = new Entities();
var q = from m in context.INVs
select new
m.INVOICENO,
Amt = m.INVDETAILs.Sum(x => x.QTY * x.AMT)
Console.WriteLine(((ObjectQuery)q).ToTraceString());
var resutl = q.ToList();
Error ocurres.
Oracle.DataAccess.Client.OracleException: ORA-00904: "Extent1"."INVOICENO": invalid identifier
Generated sql script :
SELECT
1 AS "C1",
"Project1"."INVOICENO" AS "INVOICENO",
"Project1"."C1" AS "C2"
FROM ( SELECT
     "Extent1"."INVOICENO" AS "INVOICENO",
     (SELECT
          SUM("Filter1"."A1") AS "A1"
          FROM ( SELECT
               "Extent2"."QTY" * "Extent2"."AMT" AS "A1"
               FROM "SMART607"."INVDETAIL" "Extent2"
               WHERE ("Extent1"."INVOICENO" = "Extent2"."INVNO")
          ) "Filter1") AS "C1"
     FROM "SMART607"."INV" "Extent1"
) "Project1"
It make me very upset.
Edited by: user2599728 on 2011/5/20 下午 9:45

nothing.
Edited by: user2599728 on 2011/5/23 下午 11:53

Similar Messages

  • Installing Oracle 11g ODAC 11.1.0.5.10 Beta

    I've installed Oracle 11g ODAC 11.1.0.5.10 Beta.
    It came back with installation successful.
    How do I get the Oracle Database Server(Oracle ODP.NET) to appear as one of my datasource choices?
    I added the Oracle.DataAccess.dll (v. 2.111.5.10) to my bin folder. I restarted VS2005, dropped a gridview on the page, selected NewDatasource. My only options are for Microsoft.

    This step by step tutorial should help you out:
    http://www.oracle.com/technology/obe/net11gobe/building.net/vs_otn2.htm
    There are parts of the tutorial that you can skip since you are only interested in ODP.NET showing up as a data source and using it within a gridview.

  • Install ODAC (11.2.0.2.30) Entity Framework and LINQ to Entities Failed

    Hi
    I am trying to install ODAC for Entity Framework & Link.
    But, while installing, there showed a message *"OS error, the Oracle MTS Recovery Service can't be started"*,
    and there were three choices, *"Ignore, Cancel, Retry"*.
    If I choose *"Cancel"*, the installing will be stopped, and if I choose 'Retry', it will always try to restart the MTS service, but in vain.
    If I choose *"Ignore"*, the setup will go on, but the MTS service can't be started as usual, and shows a message *"Function error"*.
    Is there anyway to fix the problem, so I can successfully install ODAC on my pc?
    Oh,BTW, I have installed the Oracle 10g and Oracle Developer 6i on my pc for other reasons, and I can't remove them.
    Will it be the reason cause the ODAC installation failure?
    Environment :
    OS: Win XP Pro 32bit
    Framework : .net 4.0
    Visual Studio 2010
    Oracle 10g
    Oracle Developer 6i

    I haven't seen a download link for 11.2.0.2.*+40+* yet. If that's the new beta version, it hasn't been released yet. We're still on beta 1 (11.2.0.2.30).
    Trust me, a lot of people are looking forward to it. :)

  • To download ODAC 11.2.0.2.50 Beta for Entity Framework

    from where can i download ODAC 11.2.0.2.50 Beta for Entity Framework?
    anyone please help me.

    So what can i use rather then 11.2.0.2.50 that will be supported for entity frame work
    i used "ODTwithODAC112030" but it is not supported by ADO. net entity model framework.
    my problem:
    i made a entity model but i cannot access data from oracle database.Nothing show in the client side data grid.

  • ODAC 11.2.0.2.30 Beta

    Hello:
    I first installed 11.2.0.2.30. I discovered that, that the installation didn't include the ASP.Net directory what contains the SQL scripts to do the Oracle Membership Provider with ASP.Net. I additionally installed 11.2.0.2.1 with Dev Tools. That means I have 2 Oracle Home directories (different local file system paths). I figured out using the ORACLE_HOME environment variable I can control which version of the ODP driver the Developer's Studio is looking at.
    Before I installed 11.2.0.2.1 I could create an ADO.net Entity Data Model using 11.2.0.2.30 beta. I wanted to test both the Entity Framework and Oracle Membership Provider. The membership provider is in the release version 11.2.0.2.1.
    What happens now, when I go to create an ADO.Net Entity Data Model, it doesn't list the ODP driver. In the Developer Studio, if I go to Server Explorer I can create a data connection using the Oracle Data Provider for .Net (using either version of ODP pointed to by ORACLE_HOME environment variable). I can look at tables, etc.
    How do I get it so I can create an ADO.Net Entity Data Model as before (using 11.2.0.2.30 beta)? The Entity Data Model Wizard acts like it doesn't know about the Oracle Data Provides for .Net as before. I have a reference to Oracle.DataAcess.dll, the 4.0 Framework version in my project (from the Beta driver).
    Is there some way to combine these 2 Oracle clients so I don't need to switch between the 2 using an Environment variable?
    Edited by: user13100444 on Feb 14, 2011 2:02 PM

    Success!!!
    I had to do the following:
    1) Uninstall all Oracle Clients.
    2) Run CCleaner to clean the registry
    3) Delete Oracle Home directory off the local file system & delete c:\program files\oracle -- PC is clean at this point.
    4) Install beta
    5) Get Xcopy version and unzip
    6) Manually copy asp.net4 to same directory where bin, odbc, odp.net, jdbc, etc, etc directories live in Oracle Home. (asp.net is a subdirectory in asp.net4 manually copy the subdirectory to where all the other directories live).
    7) Edit install.bat and REM out the Xcopy command for asp.net4
    8) From the directory where install.bat lives for the xcopy version execute the following command line --> install asp.net4 C:\oracle\product\11.2.0\client_1 OraClient11g_home1 false (this only executes configure.bat. I am not
    a great DOS jock, so I cheated and took this route)
    From this point one can go into the 2010 developer studio and create a asp.net web forms project with all the default forms. One can also add an ADO.Net Entity Data Model. The wizards will know about Oracle Database (Oracle ODP.Net) driver. I had my DBA install the Oracle Membership sql scripts. I had to get the actual SQL scripts from the ODAC 11.2.0.2.1 with Dev Tools. Neither the Beta or Xcopy installation zip file has them.
    I followed the Oracle Membership provider documentation to configure the web.config file. You know everything is working if you click on the menu option project\ASP.Net configuration. After choosing a provider, click on the security tab. If you can create a user you are in!

  • Installing ODAC Entity Framework with oracle express

    Hi, I need to develop a .net web app with oracle back end. To setup development env. for oracle I downloaded oracle database express edition 11g 2. and installed it succesfully. after I tried to install this ODAC it throws me a error
    "Remove all the spaces from the chosen ORACLE_HOME" help me out to resolve this,
    Can I use SQL Developer to connect to Oracle Express. Kindly help me out asap.

    Hello,
    This is by designed in Entity Framework, the view is not designed to be editable by default. If you persist in editing a view, you need to create an editable view, for details, please check this blog:
    How to create an updateable view with ADO Entity Framework and with LINQ to SQL
    This blog is based on the SQL Server database, however, I notice that you are working with the Oracle database, I am not sure if the Oracle database provider for Entity Framework supports the editable view, I
     suggest you could confirm this on the Oracle database forum:
    https://community.oracle.com/welcome
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Bulk upload bug in ODAC 11.2 Release 5 (11.2.0.3.20) with Xcopy Deployment

    There is a bug in ODP.NET (ODAC 11.2 Release 5 (11.2.0.3.20) with Xcopy Deployment)
    When large amount of data is uploaded using OracleBulkCopy the following exception is thrown
    System.EntryPointNotFoundException: Unable to find an entry point named 'OpsBulkCopyFreeDataPointers' in DLL 'OraOps11w.dll'.
    at Oracle.DataAccess.Client.OpsBC.FreeDataPointers(OPOBulkCopyValCtx* pOPOBulkCopyValCtx)
    at Oracle.DataAccess.Client.OracleBulkCopy.PerformBulkCopy()
    at Oracle.DataAccess.Client.OracleBulkCopy.WriteDataSourceToServer()
    at Oracle.DataAccess.Client.OracleBulkCopy.WriteToServer(DataTable table, DataRowState rowState)
    at Oracle.DataAccess.Client.OracleBulkCopy.WriteToServer(DataTable table)
    at OracleBulkUploadBug.Program.UploadData(OracleConnection connection)
    at OracleBulkUploadBug.Program.Main(String[] args)
    Steps to reproduce.+
    *1) Create a temp table*
    CREATE TABLE "RAM"."BLKUPLOADBUG"
    "COLUMN1" VARCHAR2(1000 BYTE),
    "COLUMN2" VARCHAR2(1000 BYTE),
    "COLUMN3" VARCHAR2(1000 BYTE),
    "COLUMN4" VARCHAR2(1000 BYTE),
    "COLUMN5" VARCHAR2(1000 BYTE)
    SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
    TABLESPACE "USERS" ;
    *2) Run the following c# code*
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Oracle.DataAccess.Client;
    using System.Data;
    namespace OracleBulkUploadBug
    class Program
    private const string TABLE_NAME = "BlkUploadBug";
    private const int ROWS_TO_INSERT = 10000;
    static void Main(string[] args)
    string ConnString = @"Data source=localhost/xexdb;User ID=ram; password=ram";
    try
    using (OracleConnection connection = new OracleConnection(ConnString))
    connection.Open();
    using (OracleCommand cmd = connection.CreateCommand())
    cmd.CommandText = string.Format("TRUNCATE TABLE {0}", TABLE_NAME);
    cmd.ExecuteNonQuery();
    Console.Write("Uploading data...");
    UploadData(connection);
    Console.WriteLine("done.");
    //ShowData(connection);
    catch (Exception ex)
    Console.WriteLine(ex);
    static void UploadData(OracleConnection connection)
    DataTable table = new DataTable(TABLE_NAME);
    table.Columns.Add("Column1", typeof(string));
    table.Columns.Add("Column2", typeof(string));
    table.Columns.Add("Column3", typeof(string));
    table.Columns.Add("Column4", typeof(string));
    table.Columns.Add("Column5", typeof(string));
    for (int i = 0; i < ROWS_TO_INSERT; i++)
    table.Rows.Add("aaa", "bbb", "ccc", "ddd", "eee");
    using (OracleBulkCopy oracleBulkCopy = new OracleBulkCopy(connection))
    oracleBulkCopy.DestinationTableName = table.TableName;
    oracleBulkCopy.WriteToServer(table);
    static void ShowData(OracleConnection connection)
    using (OracleCommand cmd = connection.CreateCommand())
    cmd.CommandText = string.Format("SELECT * FROM {0}", TABLE_NAME);
    using (OracleDataReader reader = cmd.ExecuteReader())
    while (reader.Read())
    Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}",
    reader.GetString(0), reader.GetString(1), reader.GetString(2),
    reader.GetString(3), reader.GetString(4));
    }

    Hi Greg,
    Thanks for the detailed explanation. Let me start off by describing our current scenario.
    We deploy our application with its own set of Oracle driver files (ODP.NET). The driver files were picked from Xcopy deployment package ODAC 11.2 Release 4 (11.2.0.3.0). This works fine for users (50% of our 1000+ user base) who do not have any other installation of Oracle drivers. For the rest of the users who may have another version of ODP.NET (ODAC 11.2 Release 5 (11.2.0.3.20)), installed via Oracle Universal Installer (OUI) we have a problem.
    Since Oracle.DataAccess.dll and OraOps11w.dll files have the same version numbers in different packages it is making things very difficult for us. The application picks up Oracle.DataAccess.dll version 11.2.0.3.20 as it is present in the GAC and uses the local OraOps11w.dll 11.2.0.3.0 present in the application folder. This causes the missmatch and the exception gets thrown. Please do note that the exception pops up only when uploading large amounts of data using Oracle bulk upload.
    You can use my demo code and try it out for yourself. Install 11.2.0.3.20 using OUI and copy OraOps11w.dll from 11.2.0.3.0 to the local application folder, next to the EXE file. The exception is reproducible always when ROWS_TO_INSERT >= 10000. Reduce the ROWS_TO_INSERT to < 1000 or 100 and it will work flawlessly. I think the error message Unable to find an entry point named 'OpsBulkCopyFreeDataPointers' in DLL 'OraOps11w.dll' is incorrect.
    It is true that there are multiple versions of OraOps11w of differing patch levels that all show the same version number.+ Any particular reason to do this? How do you keep track of which fixes are present in which file if the version number never changes?
    Regards,
    Ram

  • Scrolling bug in Firefox 3.67 still exists in Beta 4.0b7 - will it ever be fixed?

    https://bugzilla.mozilla.org/show_bug.cgi?id=581240
    I use Firefox to work online with a wiki called Confluence. When previewing a page in any version after 3.66, you cannot scroll properly to see the whole page.
    I would have provided this as feedback, but the feedback button keeps telling me to download the latest Beta and this is it.

    The test case in comment 1 of that bug report shows the Pass alert for me with the current Minefield nightly build. It also works in Firefox 3.5.16 , but not in Firefox 3.6.13
    <pre><nowiki>data:text/html;charset=utf-8,
    <script>
    function onload() {
    document.getElementById("preview").style.display = "";
    document.getElementById("preview").innerHTML = ('<iframe src="data:text/html," scrolling="no"></iframe>');
    var iframe = document.getElementById("preview").firstChild;
    var doc = iframe.contentDocument;
    doc.write("<script src='data:text/javascript,'></"+"script>"+"<script>function onload() {alert('PASS')}</" + "script>");
    doc.close();
    </script>
    <body>
    You should see an alert saying "PASS". Firefox 3.6.7, however, doesn't show the alert.
    <div id="preview" style="display:none">
    </div>
    </body></nowiki></pre>

  • Instant Client with Entity Framework (ODAC 11.2.0.2.40 Beta)

    Is this at all possible (with the current Beta version of ODAC) using the Instant Client installation?
    I have got this working using the ODAC1120240 innstallation. But it would be nice for our customers to not having go through this (not all of them are tech savvy:-).
    I would like to avoid spending hours hunting for documentation, forums etc if this is simply not possible at the moment.
    IF it is possible, why do I get the following error:
    ===============================================================================
    "Unhandled Exception: System.ArgumentException: The specified store provider cannot be found in the configuration, or is
    not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be inst
    alled.
    at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
    at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
    --- End of inner exception stack trace ---
    at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
    at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
    at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
    at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
    at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
    at KDO.MessageCenterModel.Entities..ctor(String connectionString)
    at ConsoleApplication2.Program.Main(String[] args)"
    ===============================================================================
    In the same directory as my application, I have these DLLs:
    oci.dll
    Oracle.DataAccess.dll
    orannzsbb11.dll
    oraociei11.dll
    OraOps11w.dll
    Connecting to Oracle by using "standard" OracleConnection is fine, only when I try to access my Entity model do I recieve the error.
    Any help greatly appreciated!
    ~Rolf

    Hi Rolf,
    It's works when you don't have a oracle.dataaccess.client settings(like to change oracle types).
    At the end I had to install ODAC using Beta 2, because i am using mapping settings(oracle.dataaccess.client).
    I am looking to test the new version 11.2.0.2.50, it's looks like have a XCopy version.
    Let us know if you test the new version.
    Thanks,
    Jorge

  • Bug in Entity Framework: No rows returned with criteria.

    Bug: Oracle fails to return rows with lambda criteria on string field from varchar2 column in view.
    Steps to reproduce:
    Create view:
    CREATE OR REPLACE VIEW "PHILIP_TEST" ("ROWNUMBER", "DRIVER") AS
    SELECT
         ROWNUMBER,
         DECODE(DRIVER,CHR(2),NULL,DRIVER) DRIVER
    FROM FLIGHT
    WHERE SCHEDULEDDATE = TRUNC(SYSDATE);
    Rownumber is unique key (number), Driver is varchar2(7).
    Create C# console application in VS2010
    Add Entities Model and add view.
    Add this code to Main()
    var context = new Entities();
    // Test code start
    var allrows = context.PHILIP_TEST.Where(x => x.DRIVER != null).ToArray();
    Console.WriteLine(allrows.Count());
    // Select first driver as criteria
    var driver = allrows[0].DRIVER;
    Console.WriteLine(driver);
    // Test code end
    // This line fails to return any rows
    var result = context.PHILIP_TEST.Where(x => x.DRIVER == driver).ToArray();
    Console.WriteLine(result.Count());
    Console.ReadLine();
    Add some test data to flight.
    Run it!
    The expression with criteria x.DRIVER == driver should return at least 1 row. It doesnt.
    Running the following from SQL Developer returns records: Conclution the view is fine.
    SELECT * FROM PHILIP_TEST WHERE DRIVER = 'MJA'
    If definition of DRIVER column in view is changed from: "DECODE(DRIVER,CHR(2),NULL,DRIVER) DRIVER" to just "DRIVER", then code returns rows as expected.

    are you sure your two select statements can't be combined to one query with outer join?
    if the outer join is possible, after creating the query, it will have one group with all the fields/columns you selected.
    drag the columns you selected in the personal info, outside the group.
    this should enable you to have one query with two groups, a master (personal info) and a detail (monetary calculations).
    your first frame will have the master group as source, while for the second the detail. now, the "Value if Null" should work.
    if the outer join is not possible,
    create one query with only the personal info. in the group, create column formula to get the monetary columns (you may need to create place holders if selecting multiple columns)
    drag the columns you selected in the personal info, outside the group.
    this should enable you to have one query with two groups, a master (personal info) and a detail (monetary calculations, you CF_ and CP_ columns).
    your first frame will have the master group as source, while for the second the detail. now, the "Value if Null" should work in your CF_ and CP_ columns

  • Likely bug with external editing (in CS5 not CS6 beta) and edited image not showing back up in LR

    I have come across something strange today that I've not seen before. I'm running LR 4.0 under Win7 64-bit. I usually use Photoshop CS6 beta as my external editor, but invoke CS5 when I have to use some tools that don't support the beta. Here is the scenario:
    * I have CS5 open
    * I externally edit an image in CS5 and Save it from CS5 when I'm done
    * The edited image does not show up in LR
    * I close LR and reopen it
    * There is the edited image!
    I have duplicated this many times this evening. I don't think I've seen it when I've used CS6 beta.

    Something strange is going on because I had the behavior reported of edited image not showing up after using another filter, Nik Silver Efex Pro 2.

  • Where can I download ODAC 11.2.0.2.50 Beta for Entity Framework?

    Hello,
    An application I have been developing during the last quarter of 2011 was using ODP.NET 11.2.0.2.50 which was the last beta version with Entity Framework support before final release. I would like to upgrade to Release 4 now but unfortunately it is not likely to happen with the actual project. Problem is that since I lost the installer for both 32 and 64bits versions and that the download is not available on the Oracle Downloads website anymore I can't deploy the application on new machines.
    The name of the file was ODAC1120250Beta_EntityFramework_32bit.zip but I can't find it anywhere on the web or only leads to dead links. Would appreciate a bit of help on that.
    Thank you.
    Lionel.

    So what can i use rather then 11.2.0.2.50 that will be supported for entity frame work
    i used "ODTwithODAC112030" but it is not supported by ADO. net entity model framework.
    my problem:
    i made a entity model but i cannot access data from oracle database.Nothing show in the client side data grid.

  • Entity framework TPT does not work - showstopper

    Greetings,
    I'm experiencing a similar problem that is described here:
    [Entity Framework and inheritance - Possible bug in EF?|http://stackoverflow.com/questions/11506683/entity-framework-and-inheritance-possible-bug-in-ef.]
    I'm using:
    Windows 7 64 bit
    ODAC 11.2 Release 5 32 bit
    Oracle Express 11.2 on localhost
    Visual Studio 2012
    Entity framework 5.0
    .net 4.5
    Create a simple database with TPT inheritance:
    CREATE TABLE Person(
    Id NUMBER(38, 0) NOT NULL,
    Name VARCHAR2(50),
    CONSTRAINT PK100 PRIMARY KEY (Id)
    CREATE TABLE Employee(
    Id NUMBER(38, 0) NOT NULL,
    JobTitle VARCHAR2(50),
    CONSTRAINT PK101 PRIMARY KEY (Id)
    ALTER TABLE Employee ADD CONSTRAINT ref_Employee_person
    FOREIGN KEY (Id)
    REFERENCES Person(Id)
    CREATE TABLE Superhero(
    Id NUMBER(38, 0) NOT NULL,
    Superpower VARCHAR2(50),
    CONSTRAINT PK102 PRIMARY KEY (Id)
    ALTER TABLE Superhero ADD CONSTRAINT ref_Superhero_person
    FOREIGN KEY (Id)
    REFERENCES Person(Id)
    -- Sequence
    CREATE SEQUENCE seq_id
    INCREMENT BY 1
    START WITH 55
    MINVALUE 1
    MAXVALUE 9999999999999999999999999999
    NOCYCLE
    NOORDER
    CACHE 20
    CREATE OR REPLACE TRIGGER PERSON_BI BEFORE INSERT ON PERSON FOR EACH ROW
    BEGIN IF :NEW.ID IS NULL THEN SELECT SEQ_ID.NEXTVAL INTO :NEW.ID FROM DUAL; END IF; END;
    Create a console application, add an edmx file, set up inheritance like so:
    Diagram
    And I set the Id property in Person entity as StoreGeneratedPattern to Identity
    Then I created the following program:
    static void Main(string[] args)
    //Employee
    var db = new Entities();
    EMPLOYEE e = new EMPLOYEE() { ID = 0, JOBTITLE = "Programmer"};
    e.NAME = "John Regular Doe";
    db.People.Add(e);
    //Superhero
    SUPERHERO s = new SUPERHERO();
    s.NAME = "Superman";
    s.SUPERPOWER = "Flight";
    db.People.Add(s);
    db.SaveChanges();
    //Fetch all persons and look at the type
    //this is where I get an error:
    var allPeople = db.People.ToList();
    allPeople.ForEach(x => Console.WriteLine("type: " + x.GetType()));
    This throws the following error when I fetch into allPeople:
    All objects in the EntitySet 'Entities.People' must have unique primary keys. However, an instance of 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 looks fine
    -- Person table --
    ID     NAME
    39     John Regular Doe
    40     Superman
    -- Employee table --
    ID     JOBTITLE
    39     Programmer
    -- Superhero table --
    ID     SUPERPOWER
    40     Flight
    If I take the select that EF generates in " db.People.ToList();" and run it I get the following result:
    C1      C2     NAME      C3      C4
    0X0X     40     Superman           
    0X0X     39     John Regular Doe     Programmer     
    Is this a bug in ODAC. If so is there a workaround or will there be a fix soon?
    Edited by: Amplus on 7.11.2012 07:59

    Thank you for the reply shsu
    I was being careless when I copied the error message and sequence, sorry about that. I did run this serveral times after I copied the error message. I recreate the seqence starting with 1 and recreated the problem. The error message is:
    All objects in the EntitySet 'Entities.People' must have unique primary keys. However, an instance of type 'TestingTPTInheritance.EMPLOYEE' and an instance of type 'TestingTPTInheritance.SUPERHERO' both have the same primary key value, 'EntitySet=People;ID=2'.
    The data in the tables is:
    Person:
    ID     NAME
    1      John Regular Doe
    2      Superman
    employee
    ID     JOBTITLE
    1      Programmer
    Superhero
    ID     SUPERPOWER
    2      Flight
    And the generated select is:
    SELECT
    CASE WHEN (( NOT (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL))) AND ( NOT (("Project2"."C2" = 1) AND ("Project2"."C2" IS NOT NULL)))) THEN '0X' WHEN (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL)) THEN '0X0X' ELSE '0X1X' END AS "C1",
    CAST( "Extent1"."ID" AS number(19,0)) AS "C2",
    "Extent1"."NAME" AS "NAME",
    CASE WHEN (( NOT (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL))) AND ( NOT (("Project2"."C2" = 1) AND ("Project2"."C2" IS NOT NULL)))) THEN NULL WHEN (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL)) THEN "Project1"."JOBTITLE" END AS "C3",
    CASE WHEN (( NOT (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL))) AND ( NOT (("Project2"."C2" = 1) AND ("Project2"."C2" IS NOT NULL)))) THEN NULL WHEN (("Project1"."C2" = 1) AND ("Project1"."C2" IS NOT NULL)) THEN NULL ELSE "Project2"."SUPERPOWER" END AS "C4"
    FROM "TPT"."PERSON" "Extent1"
    LEFT OUTER JOIN (SELECT
    "Extent2"."JOBTITLE" AS "JOBTITLE",
    CAST( "Extent2"."ID" AS number(19,0)) AS "C1",
    1 AS "C2"
    FROM "TPT"."EMPLOYEE" "Extent2" ) "Project1" ON ( CAST( "Extent1"."ID" AS number(19,0))) = "Project1"."C1"
    LEFT OUTER JOIN (SELECT
    "Extent3"."SUPERPOWER" AS "SUPERPOWER",
    CAST( "Extent3"."ID" AS number(19,0)) AS "C1",
    1 AS "C2"
    FROM "TPT"."SUPERHERO" "Extent3" ) "Project2" ON ( CAST( "Extent1"."ID" AS number(19,0))) = "Project2"."C1"
    With the following result:
    C1      C2     NAME      C3      C4
    0X0X     2      Superman      null      null --> should't there be a "Flight" entry here??
    0X0X     1      John Regular Doe     Programmer     null
    I also tried this:
    var result1 = db.People.OfType<SUPERHERO>().ToList(); //Count=1
    var result2 = db.People.OfType<EMPLOYEE>().ToList(); //Count=1
    var result3 = db.People.OfType<PERSON>().ToList(); //Throws the following error:
    All objects in the EntitySet 'Entities.People' must have unique primary keys. However, an instance of type 'TestingTPTInheritance.EMPLOYEE' and an instance of type 'TestingTPTInheritance.SUPERHERO' both have the same primary key value, 'EntitySet=People;ID=2'.
    The only thing I can think of is that my little console app is picking up the oracle client from oracle express instead of the ODAC driver. Is there an easy way to force it to use the correct driver? I have this in my config file but I'm not sure if it works:
    <oracle.dataaccess.client>
    <settings>
    <add name="DllPath" value="C:\oracle\product\11.2.0\client_3\bin" />
    </settings>
    </oracle.dataaccess.client>
    And I have also referenced Oracle.Data.Access here:
    C:\oracle\product\11.2.0\client_3\odp.net\bin\4\Oracle.DataAccess.dll
    client_3 directory is my ODAC Release 5 installation. I changed the config settings to:
    <oracle.dataaccess.client>
    <settings>
    <add name="DllPath" value="C:\oracle\product\11.2.0\client_3\odp.net\bin\4\Oracle.DataAccess.dll" />
    </settings>
    </oracle.dataaccess.client>
    then the program was able to run this line:
    var allPeople = db.People.ToList();
    But both objects were of type EMPLOYEE. Then I ran this:
    var result1 = db.People.OfType<SUPERHERO>().ToList();
    and get the following error:
    All objects in the EntitySet 'Entities.People' must have unique primary keys. However, an instance of type 'TestingTPTInheritance.EMPLOYEE' and an instance of type 'TestingTPTInheritance.SUPERHERO' both have the same primary key value, 'EntitySet=People;ID=2'.
    The problem must be that I do have multiple versions of Oracle client installed on my computer and it is picking up the wrong one either when I'm generating the edmx file or when the application is connecting to the db. I think my next step will be to uninstall all oracle client instances as well as oracle express and try again from scratch!!

  • Error during creating user with OracleMembershipProvider (ODAC 11.1.0.5)

    Hi. Perhaps there is a bug in DB part of OracleMembershipProvider (ODAC 11.1.0.5.10 beta): PL/SQL function ORA_ASPNET_MEM_CREATEUSER always raises exception ORA-01858, so Create User functionality doesnt work in any scenario.

    Hi.
    After some investigations I found this error appears when enviroment variable NLS_LANG is set to national language/codepage. In my case, NLS_LANG=RUSSIAN_CIS.CL8MSWIN1251.
    With this settings any try to create user raises ORA-01858 exception.
    If the NLS_LANG enviroment variable is deleted, all work fine.
    Here is example code of user creation:
    <%@ Page Language="C#" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
    protected void ButtonCreateUser_Click(object sender, EventArgs e)
    Membership.CreateUser(TextBoxUserName.Text, "!qwertyuiop");
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:TextBox ID="TextBoxUserName" runat="server"></asp:TextBox>
    <asp:Button ID="ButtonCreateUser" runat="server" OnClick="ButtonCreateUser_Click"
    Text="Button" UseSubmitBehavior="False" /></div>
    </form>
    </body>
    </html>

  • Importing modified Bug WIT does not refresh the template in TFS 2013 for the project created using Scrum Template.

    Hi,
    We have a TeamProjectA created in a collection using ScrumTemplate 2013.4. I have added a new State 'Duplicate' in the Bug WIT and modified the workflow. Also the ProcessConfiguration file is modified to match the metastate and imported using the ImportWit
    Commands which were successful. When I Export the modified WIT using Process Editor for TeamProjectA I can see the Bug.xml has my changes. However, when I try to create a new Bug through TWA, I do not see the new State'Duplicate' that I added.
    I dont see my changes are updated in the common configuration files Path ie C:\\Program Files\Microsoft Team Foundation Server 12.0\Tools\Deploy\ProcessTemplateManagerFiles
    Note: I have a different TeamProjectB created using the Agile template created under the same Collection as my other TeamProjectA. Not sure if this has anything to do with my problem.

    Hi NetLearuner15,  
    Thanks for your reply.
    If you want use witadmin command on your TFS Server machine, you need install VS 2013 on your TFS 2013 Server machine.
    Have you tried create new Bug using VS? The new added state value shows correctly in VS or cannot see it in VS too?
    You’re using TFS 2013 Update 4 and VS 2013 Update 4?
    Yes, you can restart your TFS Server and check the result.
    And we suggest you add a new custom field in your Bug_Test work item type(Fields and Layout) or only edit a default state value in it using Process Editor, then save this Bug_Test work item type and check if this new update shows correctly when you create
    a new Bug_Test work item from TFS Server. If the  new field or changed state value can be updated correctly in your TFS Server, I think your initial ‘Duplicate’ state value not defined correctly in your Bug WIT>>workflow.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • A Valid Address is needed to purchase

    Mind you before I hooked up my Apple TV I deauthroized my MacBook Air because I sold it. I bought the Apple TV 2 the other day on Sunday. 08, 2011.  I enjoyed renting one movie and watched a few Netflix movies.  This was after I ran the update to App

  • Projectors with ipad2

    I'm looking to buy a mini projector to work with iPad I was thinking of the Philips pico pix ppx1430. Will it work? Anyone tried it?

  • How can i convince my parents to bring me ipad mini

    how can iconvince my parents to bring me ipad mini 16 gigs wifi, they say that my iphone 4s is enough and we have an ipad that my brother does not let me use any help

  • Code/completion insight Multi column select

    Hi Is it possible to select multiple columns via code insight pop up window. For example if I have the following query select a. from table a If I type a. completion insight will show me the columns for the table. I would like select more than one co

  • TS1292 i forgot my security question answers how do i reset them?

    i just added $15 onto my account and it asked me for my security question answers and i forgot them. how do i reset the answers?