Hi

I am using MySQL with WO on a new application so have control over how things are implemented. I am unsure what is the best way to work with foreign key constraints for actions such as database inserts and deletes to make sure that database actions are done in the correct order to avoid foreign key constraint errors.

I know this is a fairly common EOF problem but am interested in WO gurus' views. From what I can tell there are three ways to get round this ordering problem, unfortunately the first is not an option for me using MySQL:

1) Use "DEFERRABLE INITIALLY DEFERRED" option for your foreign keys.
Not an option for MySQL as it is not supported.

2) Do not use foreign key constraints in the MySQL tables and instead rely on the EOModel to implement the equivalent constraints.

3) Implement a EODatabaseContext.Delegate object with the databaseContextWillPerformAdaptorOperations method to manually control the ordering of operations.

Given that option 1 is not available for me what is the preferred way to handle this ordering issue from 2 and 3?

Any advise welcome!


Regards

Giles


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to