• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple foreign keys pointing to the same table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple foreign keys pointing to the same table


  • Subject: Multiple foreign keys pointing to the same table
  • From: Pavan Kumar Jayam <email@hidden>
  • Date: Mon, 14 May 2012 14:27:42 +0530

Hi List,

I want to have multiple foreign keys in Table1 representing same table Table2.

Eg: Employee table have a Department table primary key as foreign key, now I want to have another foreign key in Employee table representing Department table. Which means an employee can be a member of two departments.

I have foreign key in table1 represents table 2 primary key, also I want to have another foreign key in table 1 to represent the same table(table 2).

Both the table 1 and table 2 records are creating in the same editing context and saving the editing context changes with ec.saveChanges().

With one foreign key I am able to save table1 and table2 records, but when I am saving the editing context with multiple foreign keys of same table I am getting error "error code: 2291 == msg ORA-02291: integrity constraint() violated - parent key not found".

Please advise how to implement it with Oracle 11 and WO 5.4.3.

Regards,
Pavan.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Multiple foreign keys pointing to the same table
      • From: Ralf Schuchardt <email@hidden>
  • Prev by Date: Weboject 5.3.3 + maven + woapplication-archetype
  • Next by Date: Re: Webobjects-dev Digest, Vol 9, Issue 428
  • Previous by thread: Re: Weboject 5.3.3 + maven + woapplication-archetype
  • Next by thread: Re: Multiple foreign keys pointing to the same table
  • Index(es):
    • Date
    • Thread