ToOneRelationship and saveChange method
ToOneRelationship and saveChange method
- Subject: ToOneRelationship and saveChange method
- From: "Jérémy DE ROYER [INGENCYS]" <email@hidden>
- Date: Tue, 20 Sep 2011 08:56:30 +0200
Hi All,
I have an editing context question.
I've got 2 tables : contact and compaign
I want to add contacts to a compaign so I've created a many to many relationship between the table contact and the table compaign. That work fine.
Problem is that when I add (lots of) contacts to a compaign because webobjects, when updating database with saveChanges(), update all contacts in database (even if fields of contacts haven't been changed).
For table with 5 rows, I takes 20 secondes for 1000 added contacts, that's ok.
But for table with more than 50 rows, I takes more than 2 minutes.
What's the best solution to avoid that wast of time (that make problem when submitting form that takes to many time... for nothing)
I though about :
- creating "linking" table with no data row to avoid long save, but I have to change all my model...
- remove contact from updatedObjects set, but that's dirty because willUpdate methods won't be called
Any idea to avoir SQL update on objects that didn't changes except to Many Relationship ?
Jérémy _______________________________________________
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