• 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
Unprocessed changes on an object without changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unprocessed changes on an object without changes


  • Subject: Unprocessed changes on an object without changes
  • From: Fabrice Pipart <email@hidden>
  • Date: Mon, 28 Aug 2006 19:41:03 +0200

Hi list !

I recently solved a bug I had but I still wonder why it happened.
Could someone help me understand the following?

Lets say I have a relationship between A and B : A <<--> B
In EOModeler both have diamonds (accessible via code)

I have two threads
In thread1 (locked of course)
I fetch B1
In thread2 (locked of course)
I modify B1 : B1.value changed from 1 to 2
I saveChanges() : B1.value is 2
In thread1
I create A1 and call A1.addObjectToBothSidesOfRelationshipWithKey(B1, "B");
I saveChanges

At that moment I have my B that has a value back to 1.
I found why. Just because I set the A.B relationship in thread1, B is part of the thread1 ec's "unprocessedChanges"
And therefore, its the old value of B that is saved in thread1

If I remove the diamond in Bs relationship it works fine

Is this a normal behavior?
Do I do something wrong?


Fabrice

www.easyshadow.com


International Corporate Consulting

Palais de la Scala

1 avenue Henri Dunant

Suite 1155

MC - 98000 Monaco


Skype: fabrice.pipart

Tel.  +377 97 98 21 04 (direct)

Fax. +377 97 70 88 07



 _______________________________________________
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: Unprocessed changes on an object without changes
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Looks like ThinkSecret got some of the scoop on WO from WWDC'06
  • Next by Date: Re: WO in Java or Objective-C
  • Previous by thread: Re: WO Mailing list manager?
  • Next by thread: Re: Unprocessed changes on an object without changes
  • Index(es):
    • Date
    • Thread