• 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
Re: MySQL and Foreign Keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MySQL and Foreign Keys


  • Subject: Re: MySQL and Foreign Keys
  • From: Jacky Gagnon <email@hidden>
  • Date: Wed, 23 Mar 2005 11:29:28 -0500

Hi Doug,

MySQL 4.0x doesn't have an option like DEFERRABLE INITIALLY DEFERRED. :-(

You must use the delegate databaseContextWillPerformAdaptorOperation in EODatabaseContext.Delegate to order operation.

In your Application constructor you can call EODatabaseContext.setDefaultDelegate(new YourClassWithImplementation());

Implements databaseContextWillPerformAdaptorOperation in your class to order Operation.


Jacky



Le 05-03-23, à 11:01, Doug Andrews a écrit :

Is there a way to get EOF to order database operations when using MySQL?
Basically, here is the problem:
Table A has a 'to one' relationship with table B.
I want to add a record to both tables within the same transaction, but if i cannot control the order of database operations, i will get a foreign key constraint error.

FrontBase has the "DEFERRABLE INITIALLY DEFERRED" option for your foreign keys that would solve this problem.
There does not seem to be an option like this for MySQL.
Does anyone know how to deal with this issue when using MySQL?


- Doug Andrews
- Baseview Products
- Ann Arbor, MI
- email@hidden

_______________________________________________
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

 _______________________________________________
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

References: 
 >MySQL and Foreign Keys (From: Doug Andrews <email@hidden>)

  • Prev by Date: MySQL and Foreign Keys
  • Next by Date: how to get fresh data from backend?
  • Previous by thread: MySQL and Foreign Keys
  • Next by thread: Re: MySQL and Foreign Keys
  • Index(es):
    • Date
    • Thread