• 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
ToOneRelationship and saveChange method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: ToOneRelationship and saveChange method
      • From: Chuck Hill <email@hidden>
    • Re: ToOneRelationship and saveChange method
      • From: Kieran Kelleher <email@hidden>
  • Prev by Date: Re: Bundle loading during unit testing outside Eclipse
  • Next by Date: Re: ToOneRelationship and saveChange method
  • Previous by thread: ERXReCaptcha & SSL
  • Next by thread: Re: ToOneRelationship and saveChange method
  • Index(es):
    • Date
    • Thread