• 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
How do I update a relationship in a WODisplayGroup?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I update a relationship in a WODisplayGroup?


  • Subject: How do I update a relationship in a WODisplayGroup?
  • From: email@hidden
  • Date: Tue, 13 Dec 2005 15:57:12 -0500

Hi all,

I have been following Nathan's WODisplayGroup podcast and incorporating some of his ideas into my own application.

I have a simple WODisplayGroup that displays a group of Localizations.  (Localization is the entity).  This entity has single to-one relation to another entity called DateFormatCode.

Localization
----------------
code
descriptor
primaryIdDescriptor
primaryIdFormat
dateOfBirthFormatCode   (-> to-one relationship to DateFormatCode.code)

DateFormatCode
-----------------------
code
displayedDateFormatString
javaDateFormatString

From EOModeler I have set up the relationship and created a simple WODisplayGroup on a WOComponent that has a WOForm that accepts edits to the Localization entity and saves them to the database.  The WODisplayGroup is set to "Fetches On Load".

All seems to be working great.  I can change any of the attributes of the Localization entity (such as descriptor, primaryIDFormat, etc).   When I change any of these attribute, I immediately see the changes reflected in the WODisplayGroup.   However, while I can change the dateOfBirthFormatCode, and I even verify it is stored in the database, my WODisplayGroup still shows the old value.  (I am actually displaying the displayedDateFormatString attribute by walking the relationship).  If I restart the application, then and only then, does the related item reflect the last change.

I have tried to use redisplay() and fetch() on the WODisplayGroup  before returning the page, but it did not have any affect.  I have searched the lists and found one other who asked a similar question.  He eventually answered himself after getting no responses and stating that he used invalidateAllObjects() on his editing context.  I tried this as well and it works, but I share his concern that I feel guilty with having to do this.  It seems like overkill to me.  

Any suggestions?

Thanks,

Kev
 _______________________________________________
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: How do I update a relationship in a WODisplayGroup?
      • From: Zak Burke <email@hidden>
    • Re: How do I update a relationship in a WODisplayGroup?
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: WOConditional and WOCheckbox Display Problems
  • Next by Date: Re: How do I update a relationship in a WODisplayGroup?
  • Previous by thread: Re: Database System Tables [WO newbie]
  • Next by thread: Re: How do I update a relationship in a WODisplayGroup?
  • Index(es):
    • Date
    • Thread