entity framework - EntityFramework with Oracle Insert many to many error -


I'm using EntityFramework 5.0 to model your Oracle 11g database. I have 3 tables with several tables.

  Make Table Zsa (ID number (10,0) is not, name VARCHAR2 (20 BYTE) No Kantrostent za_pk primary key (id)); Table Create Zb (ID number (10,0) NULL, name VARCHAR2 (20 BYTE) No, no, Kantroln zb_pk create PRIMARY KEY (ID)) Table (Za_id number (10,0) zero, zb_id NUMBER (10, 0) void contract zc_pk primary key (za_id, zb_id), contract zc_za_fk foreign key (za_id) references (ID), CONSTRAINT zc_zb_fk foreign key (zb_id) reference zb (id))  

table To add a record of inserting, I add and trigger the sequences in each table:

  Select the new old ROW BEGIN ZA_SEQ.nextval as old as the first trigger jade-transger before jade referencing: Double by NEW.ID; End; For each line, create new ZB as new ZB-transerring injector before creating the tracer zb_trigger or start over again: Select ZB_SEQ.nextval: Dual to NEW.ID; End;  

Now, when I use this code to insert records in the database:

  ZA za = new za (); Za.NAME = "ZA1"; ZB zb1 = new ZB (); Zb1.NAME = "ZB1"; ZB zb2 = new ZB (); Zb2.NAME = "ZB2"; Za.ZB.Add (ZB1); Za.ZB.Add (zb2); Institutions institutions = new institutions (); Entities.ZA.Add (ZA); Entities.SaveChanges (); I get this error: An error occurs when saving such entities that do not expose foreign key properties for their relationship. EntityEntries property will return to the taps because one entity can not be identified as the source of exception. While handling exceptions, savings can be made easier by highlighting foreign key properties in your unit types. See Inraksepshn For more information:  
  Inraksepshn: ORA -022 9 1 violate the integrity constraint (Simka.ajisi_jibi_fke) - did not match the original key  

So how can I include several such relationships in the table to record?

I've got a few days after item. When I make a model from the database, all the properties of the unit have its property store-granitary pattern identified. as shown in this photo


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -