• 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
Relation oddity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Relation oddity


  • Subject: Relation oddity
  • From: Wolfram Stebel <email@hidden>
  • Date: Sat, 24 Jun 2006 12:19:36 +0200
  • Thread-topic: Relation oddity

Hi list,

i have a huge data modell and allways use factory methods to create and init
EO's. I'm using the defaultEditingContext.

In some of the factory methods i assign a Division "d" to a (n:1) relation
by the setter (Division is a derived class in a vertical inheritance). "d"
is taken from person.defaultDivision, a parameter to the factory method.

    theEvent.setDivision ( d );

When i edit theEvent in a page, I'm able to set theEvent to another
divisione from a popup listbox. The Listbox is bound to a list from a
session EO, i.e. client.divisions. The data is saved correctly to the
database.

When i change the factory method to use

    theEvent.addObjectToBothSidesOfRelationshipWithKey ( d, "division" );

and continue doing the same (change the division via popup listbox), on the
first save the wrong division is saved. I can see that the wrong fk is
written.
Tracing the values of the division in the save cycle shows the correct value
before **and** after the saveChanges.
When i open theEvent again and change the list value and save again, the fk
is saved to the correct value.


Anybody seen this?
I was told to use addObjectToBothSidesOfRelationshipWithKey liberally (Hi
Chuck :-), Page 38 ).


Wolfram


 _______________________________________________
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: Relation oddity
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: Java version 1.4.2_09 issues
  • Next by Date: Re: Relation oddity
  • Previous by thread: Re: Cant reenter deployed application after an uncaught exception.
  • Next by thread: Re: Relation oddity
  • Index(es):
    • Date
    • Thread