• 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
Re: Refreshing objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refreshing objects


  • Subject: Re: Refreshing objects
  • From: Jean-François GUILLAUD <email@hidden>
  • Date: Wed, 12 May 2004 14:57:19 +0200
  • Organization: CRI - Universite de La Rochelle

Hi David,

We experiment the same issue...

Actually, when you specify setRefreshesRefetchedObjects(true) to your fetch specification, only the objects that are refetched are updated, the relationship objects are not.

The only way we found at the moment is to re-define the relationship method (e.g.: loyalty()) to explicitly fetch the relationship object with a setRefreshesRefetchedObjects(true) again.

Has someone a better idea?

Regards,

Jeff



David Griffith a icrit :

I have two separate WO applications that run at the same time, but are used
by different target audiences.

In Application 1, someone may enter an order.
In Application 2, someone else needs to see that order immediately.

In Application 2, the order status will be updated.
A user in Application 1 may need to see that order status updated
immediately (while still logged in).

Also, some information in a table which is related to the currently logged
in user may have had some of its data updated and needs to be visible to the
logged in user immediately.

I have tried various methods as described in the documentation but I can9t
seem to get the modified objects and their relationships (those that are
currently registered with the default editing context in Application 1) to
refresh, no matter what I do.

If I shut down the application and re-launch it, of course all the data is
fresh.

Can you someone give me some sample code which demonstrates the normal way
to refresh these objects?

For example:

Application 1:

curSess.currentCustomer() returns a Customer object (for the currently
logged in customer)
customer.loyalty() is a to-one relationship between the customer object and
its loyalty object.

If customer.loyalty() is updated in Application 2, I want Application 1 to
reflect that update immediately.

Regards,
David.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Refreshing objects (From: David Griffith <email@hidden>)

  • Prev by Date: Re: Refreshing objects
  • Next by Date: Re: DatabaseAccess
  • Previous by thread: Re: Refreshing objects
  • Next by thread: Re: Refreshing objects
  • Index(es):
    • Date
    • Thread