TPT entity framework does not--> 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.

Tags: Database

Similar Questions

  • Managed Beta 2 - projects of the Entity Framework does not

    Tried to do the simplest EF test I think:

    1 deleted all the stuff of Oracle on my system, getting rid of the development tools and others. Reinstalled the client stock 11.2.3.0 (without tools). Installed the new managed Beta 2 in a new House, with development tools.
    2. create a new project 4 .net (c# console application).
    3. create a new Oracle connection, using the managed provider. Travelled around the work a little, and tables.
    4 create a new FE model, load the tables of the database. This also works.

    Where it does not, it's when I try to run and do a query, I get this:

    ArgumentException: The specified store provider is not found in the configuration, or is not valid.
    Inner ArgumentException: "could not find him required .net Framework Data Provider." It cannot be installed. »

    Explicitly adding a reference to Oracle.ManagedDataAccess and Copy Local = True parameter has not changed anything. I don't know at this point what he seeks, but is not finding it.

    Also tried adding a configuration section and set TNS_ADMIN, just in case it was. Who has not to solve it. In fact I had to add this to the top of the config file to make it run even after you have configured the config:
    "< name =" article oracle.manageddataaccess.client"type =" OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version = 4.112.3.60, Culture = neutral, PublicKeyToken = 89b483f429c47342 "/ >

    I will update the post if I tell me what goes wrong here, but it seems like it should work.

    I assume that you run the configure.bat Installer script included with the installation of Xcopy. In the future, you can run just this part of the script that configures the client factory section. The installation script is commented so that you can easily discern where it is.

    In this way, you don't need to create the unique entry from factory to customer for .NET applications on your machine.

  • Entity Framework does not load the DB Oracle Types columns

    Hello world

    It is my first foray in EF and EF on Oracle, so go easy on me please!

    I use the ODAC beta 2 with VWD2010 and declaring my class of entity with the types of Oracle, for example. OracleString, etc. OracleDate.
    Everything seems ok, but when I insert my entity from the database, only DB columns reported in my class of entity types with .net (not the Oracle ones) are loaded.
    public class Customer {
    [Required]public string ACCOUNT {get; set;}
    [Required] public OracleString NAME{get; set;}
    }
    OracleDB _db = new OracleDB();
    string Account  = "TESTCLIENT";
    var customer = (from c in _db.Customer where c.ACCOUNT == Account select c); 
    If in the case above, the entity has only the value of ACCOUNT set. The NAME value is set to null.
    If I change the channel NAME declaration, then it loads ok.

    Am I missing something? Or can we not use these types in EF?

    Thank you
    Nick

    You are not supposed to use the types of Oracle in the FE model. You use .net types and EF manages the conversion to types as necessary to interact with the Oracle database.

  • Symantec framework does not

    Symantec working framework does not. All the answers? Thank you

    http://community.Norton.com/T5/Norton-360/Symantec-framework-not-responding-Norton-360-4-1/TD-p/221352

    It's a question of Norton.

    You need to contact Norton Support or Norton Community Forums.

    https://support.Norton.com/SP/en/us/home/current/info?INID=us_hho_topnav_customer_care

    http://community.Norton.com/

  • new entity persistence does not update the other side of the relationship?

    Hi all

    I don't know if I missed this when learning/reading on ejb3... I have two objects, a user and a friends list. A user can have many friends. A friends a lot back to the users. When I still a new user... There no friends yet... which works very well. When I persist a friend, I still the entity from a friend... who saves. I even add the friend.setUser (user). For some reason, the persistence of a friend works... but the user.getFriends () returns 0 friends. I would have thought persisted a new entity to a friend with the set of users, would also update the user with a mapping of many institutions? It seems that I have to do something like:

    The < friends > friends list = user.getFriends ();
    If (null == friends) {}
    friends = new ArrayList < friend > ();
    user.setFriends (friends);
    }
    Friends.Add (User);

    When I do this... It then adds the friend, and it seems to update the relationship of the user so that user.getFriends () returns the newly added friend too.

    Is there a better way to do it? Should I rather put the new friend on the list of users... and who will continue the friend too?

    Thank you.

    Yes, unfortunately, you must do it manually. Hibernate supports this feature, but that does not make them in the jpa specification, so when you use App, you must explicitly update the two ends of the relationship.

  • ERPI accounting entity group does not record

    Hello

    I tried to select some features and create a group of accounting entity. I can record it without any problem. But when I closed and reopened I see not all entities that I've associated with the group. Few of them are deselected. Also, the accounting entity group is not available for use in the Import Format. ERPI v11.1.2.2.

    Kind regards

    Brig.

    Some glitch in the system. Laughing out loud

    It is not so stable. I get a lot of questions of Java and ADF. I get errors during the recording of changes in the ERPI. But still survive with the product.

    Kind regards

    Brig.

  • 7.2 framework does not install under Windows 7 Ultimate

    HELP: FrameMake2 7.2 does not install under Windows 7. Near the end of the installation, it hangs with a blank dialog box and a warning. Nothing else.

    All view

    Keep smiling

    Thomas

    Hi Thomas,

    Long time no see...

    If FM7.2 is not officially supported, I think you must be in compatibility mode so that it can behave properly with Windows 7.

  • 4.5 Microsoft Framework does not work properly

    First see the error when you try to run a lot of basic programs such as assistance to decision-making in charge of hp. The exact error is "c:\windows\microsoft.net\frameworkx64\v2.0.50727\mscorwks.dll is not designed to run on windows or it contains an error. I am running windows 8, and to download the 4.5 but the installer refuses to proceed because there is already an equivalent version installed. I also tried to use a tool to remove the current version of the framework and re install it but no luck yet once because the framework is always magically. I appreciate any help I can get. I could not find similar questions so I created a new, but I apologize if there is already a fix.

    How does this relate to the features of Windows Update?

    Note: Win8 is supplied with .NET Framework 4.5 already installed by default. See http://msdn.microsoft.com/en-us/library/5a4x27ek.aspx

    Is...

    • Panel | Programs and features. Turn Windows features on and off: .NET framework 4.5 Advanced Services <= this="">  

    .. checked (activated; turned on)?

  • Age Of Empires Online is angry a lot and NET. Framework does not

    I'm having a problem with Age Of Empires.  He continues to display a black box around the objects of many.  As the card, the cat, units etc...

    Is it to do with the NET. Framework.  If so I can't download it because it repeat it cannot install net framework 1, 2 and 3. I am able to install Net Framework 1 from the website itself.  If I download Windows Movie Maker, it says that it requires net framework 1, 2 and 3.  But it is impossible to install it. Anyway this happens to me on my computer and on my pro surface.  They have all two 8 Pro 64 - Bit Windows on them.

    The default value that .net included in windows 8 is 4.5. The old version of .net is not required.

    There might be some app run at startup which is your CPU of doping use.

    Launch the game mode of boot is a way to discover the faulty app to run at startup.

    http://support.Microsoft.com/kb/929135/en-us

    Link to movie maker

    http://Windows.Microsoft.com/en-in/Windows/get-Movie-Maker-download

    Ded9

  • Windows 7 update does not

    My entire hard drive crashed, lost everything.  The recovery process has not worked.  I replaced it with a new (1 to).  I have a HP Pavilion Elite HPE 410t with 8 GB or ram.  I have Windows 7 discs.

    I installed Windows again, but I meet all kinds of questions.

    (1) Windows update does not work - guard telling me the service is not running.  Checked, and this is according to the system.

    (2) .net framework does not install

    (3) another strange thing is that some web pages KB MS are not allowed by EI.  Very strange.

    I'm about to order the recovery media to my system via the website of HP, but I would like to hear if there are suggestions from the community.

    Thanks in advance.

    Hello

    Of your HP PC support site shows that you have an Intel Chipset. If you need to download and install this driver.

    Here is the driver download site for your PC with all the available drivers and software.

    Here are instructions on running the diagnostics of startup time.

    Let me know how it goes.

    Jaco

  • The battery icon says connected does not support

    When I clicked on the battery icon that he read plugged not supported. I turned off the computer & pulled the battery, then I held the Start button for 10 seconds, put battery back in & read it plugged in charge.  The next day, it was the same probleThe computer is the Pavilion 10. Looks like a domestic framework does not work. Any suggestions would be helpful.

    Original title: battery icon says not connected charginr

    Hi nancypalmiter,

    1 - is your laptop battery charge when turned off?

    2 did you do changes on the computer before the show?

    Sometimes, the problem may be with the laptop. The battery isn't bad, but it could be a loose connection or hardware problem with laptop. It will be the right idea to get the material under test if the battery of the laptop is not getting loaded even if the laptop is turned off.

    You can also try the BIOS update and check if it helps. You can get in touch with the system manufacturer for assistance for the update of the BIOS.

    Warning: Be careful when you change the BIOS settings. The BIOS interface is designed for advanced users, and it is possible to change a setting that can prevent your computer from starting properly. BIOS update should be made only if necessary (to solve a compatibility problem, for example). It can be a complicated process, and if an error occurs, your computer could be rendered inoperative. Be sure to observe the instructions of the manufacturer.

    Reference link:

    BIOS: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/BIOS-frequently-asked-questions

    Additional information:

    Battery not power Notebook or hold a Charge

    http://h10025.www1.HP.com/ewfrf/wc/document?cc=us&LC=en&DLC=en&docName=c00259897

    Hope this helps and keep us informed if you need help.

  • PS possible bug on Wondows? Value of the radius of the value 0.1 for filter | Sharpen | Smart Sharpen does not at all.

    Hello

    I'm running the PS latest version 2015.1.2 (subscription) - 20160113.r.355 x 64
    I installed it on a Windows 10 computer and on a MAC El Capitan (OS X 10.11).

    But there is a difference in what a certain sharpening setting does not work on the Win10 PC.

    I chose:
    Filter | Sharpen | Sharpness...

    From there everything works OK on the Mac.
    But on the PC, a framework does not at all and it is if I set the RADIUS to 0.1.
    All other values respond normally, while the 0.1 parameter is simply dead (respond well on MAC).

    I (re) installed PS in Norwegian and English (International), but the problem is persistent.
    This could be a bug in the version of PS window?


    Concerning


    Erik Aaseth

    Norway

    Solved!

    When you enable more "accurate" for sharpness (under the gear wheel), the value 0.1 works too!
    But w / just "use Legacy" checked (by default), there is not admissible.

  • Regular clicking on does not select the Comp bound together, now Alt + click not?

    Encountered a weird problem where timeline click and alt + click seems to be switched?

    And simple clicking a clip with the linked audio file, he chose all the multimedia documents, and if I wanted to select just the video or just audio I hold alt + click. Now all of a sudden happened? Single click selects all audio or video only, and alt + click selects the whole linked clip?

    Why is this? How to switch this back?

    I'm on CC, 2014

    Thank you!

    What probably happened is that the selection in the timeline panel button has been clicked inadvertently. This option is enabled by default, and when it is, it maintains the behavior you expect: clips containing audio and video act as a single unit, when you click on them in a sequence. With this disabled button and therefore linked selection disabled, each clip component acts as an independent entity and does not take into account the bound State. This is similar to what happens when you hold down the ALT key and click a clip when linked selection is active. Basically, this button is a toggle and Alt gives you the opposite of whatever state you are in.

    This is what the button looks like in the timeline panel:

    You can also change this option in the menu of the sequence. Hope that helps!

  • 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" >

  • Flash does not not in the links of the framework

    I use flabell mp3 player on my web page, I have created frameworks for that so this mp3 player comes in frame when I click on the link of the other frame, every thing is normal but the music is not playing, this problem is with mozila only because I tried chrome and IE, it works fine with that , but mozial it does not work.

    This image has a specific CSS code?

    We have seen some reports that adding code transformation or transition to the frame is causing issues.

Maybe you are looking for

  • Where can I find the story version of android on the desktop version?

    Hello!Thank you for your great efforts bring the Firefox Sync. On my Firefox for desktop PC (v30.0), I can't find the browsing history from my Android device, which is running Firefox for Android (v30.0). However, I can find the browsing history in F

  • broken check of email Sync feature on create new account

    broken check of email Sync feature on create new account on windows xp pro sp3 all updates were installed very old machine. Firefox is the latest version 30.0. I am trying to create a sync account to migrate my firefox profile (bookmarks, quick links

  • Satellite C850-178 - how to remove the keys from keyboard for cleaning?

    Nice day! Recently, I accidentally spilled juice my * Toshiba C850-178 * laptop keyboard and some keys are now sticky or difficult to press. I would like to know how to clean sticky keys.I've been looking for a way how to remove the keyboard, but I'v

  • InsertTextBoxLine with different text colors

    Hi all I am upgrading an application using CVI2009 and I would like to use the InsertTextBoxLine function. InsertTextBoxLine (int panelHandle, int controlID, int lineIndex, char text []); I must say clearly two types of lines for the user, the lines

  • Windows Media Center has not worked since the storm (Windows Vista)

    I have Windows Vista with Windows Media Center (which I LOVE!) through this huge dish on our House, but we had a big thunderstorm last week. Since then, I have been unable to get most of the channels to watch TV via Windows Media Center. I know that