| You can use the delegate "databasecontextWillPerformAdaptoOperations"; I use it with MySQL 4.1 with innodb tables. I found an old example with Google : ----------------------------8<------------ cut here -------------------- public NSArray databaseContextWillPerformAdaptorOperations( EODatabaseContext aDatabaseContext, NSArray adaptorOperations, EOAdaptorChannel adaptorChannel) { NSMutableArray someAdaptorOperations = null; NSMutableArray insertOperations = new NSMutableArray(); NSMutableArray deleteOperations = new NSMutableArray(); NSMutableArray returnOperations = new NSMutableArray(adaptorOperations); Enumeration insertEnumerator = adaptorOperations.objectEnumerator(); while (insertEnumerator.hasMoreElements()) { EOAdaptorOperation operation = (EOAdaptorOperation)insertEnumerator.nextElement(); EOEntity entity = operation.entity(); String entityName = entity.name(); int adaptorOperator = operation.adaptorOperator(); if (entityName.equals ("someEntity")) { if (adaptorOperator == EODatabaseOperation.AdaptorInsertOperator) insertOperations.addObject(operation); if (adaptorOperator == EODatabaseOperation.AdaptorDeleteOperator) deleteOperations.addObject(operation); } } if (insertOperations.count() > 0 || deleteOperations.count() > 0) { someAdaptorOperations = new NSMutableArray(adaptorOperations); someAdaptorOperations.removeObjectsInArray(insertOperations); someAdaptorOperations.removeObjectsInArray(deleteOperations); returnOperations = insertOperations; returnOperations.addObjectsFromArray(someAdaptorOperations); returnOperations.addObjectsFromArray(deleteOperations); } return returnOperations; } -- Jacky On 06-02-23, at 16:06, John Huss wrote:
|
_______________________________________________ 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]
