• 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: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder


  • Subject: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • From: David Holt <email@hidden>
  • Date: Fri, 7 Apr 2006 17:13:39 -0700

Thanks Chuck,

Merging our last couple of posts:

It does work!!

I'm not sure that it should.

You're killing me! I suspected it wouldn't work which is why I posted the clarifications before I tried it. I just substituted the applicationUsers key and it "just worked". Here's the code:

/** @TypeInfo Meeting */
public NSArray meetingRepetition()
    {
ApplicationUser applicationUser = (ApplicationUser) valueForKeyPath("session.user");
EOEditingContext ec = applicationUser.editingContext();
return EOUtilities.objectsWithQualifierFormat(ec,
  "Meeting",
  "applicationUsers = %@",
  new NSArray(applicationUser));
}



Two clarifications: one is that Meeting <-> ApplicationUser is many to many.


Well, that does make it more tricky.  EOF does not come with a "users contains %@" for qualifying against to-many relationships.  There are options.  I suspect that Project Wonder has one.  It seems to have at least one of everything.  :-)  You can also use one of Pierre Bernards very clever qualifier extensions found at:
http://homepage.mac.com/i_love_my/webobjects.html


So now I have no idea why the applicationUsers accepted one ApplicationUser as the argument. 


What is the difference between using the code as you gave me and using the binding out of WOBuilder?

Um, which binding are we talking about?

The "session.user.meetings" variable that I dragged from the lower part of WOBuilder to the list item of my WORepetition.

Using the binding seems to delay updating for quite awhile on the display side, while using the EOUtilities method updated immediately.

Sounds like your "binding" is caching something.


I'll buy that.



The second is that I am trying to get the fresh data with a fetchspec.setRefreshesRefetchedObjects(true)


Seeing as how I am lost in the weeds, let me take a step back.  What are you trying to refresh?  We need to make a distinction between
1) Which objects are in the relationship (e.g. have some attendees been added or removed?)

No change to users. Ideally the user logs in, makes a change to the meetings schedule. Goes to his home page and sees the updated meeting information.

2) The attributes of the objects in the relationship (e.g. meeting time was changed?)

Exacty. For example: Makes a new meeting and invites participants. Changes a time or location for the meeting.


A refreshing fetching will refresh the data for (2) but not (1).

So given that the EOUtilities code shouldn't have worked, can I use a fetch spec for this?


 _______________________________________________
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: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
      • From: Chuck Hill <email@hidden>
References: 
 >Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder (From: David Holt <email@hidden>)
 >Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder (From: Chuck Hill <email@hidden>)
 >Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder (From: David Holt <email@hidden>)
 >Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder (From: Chuck Hill <email@hidden>)
 >Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder (From: David Holt <email@hidden>)
 >Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • Next by Date: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • Previous by thread: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • Next by thread: Re: Creating a fetch that returns the same results as using "session.user.meetings" in WOBuilder
  • Index(es):
    • Date
    • Thread