• 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
Question on fetching theory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question on fetching theory


  • Subject: Question on fetching theory
  • From: Gustavo Adolfo Pizano <email@hidden>
  • Date: Wed, 20 May 2009 19:23:57 +0200

Hello.

I think I have done something wrong.
As far as I know, and because the docs says so, I receive cached data unless 3 conditions. 
  • the timestamp of the snapshots of enterprise objects are older than the editing context’s timestamp

  • the enterprise object has been invalidated

  • the enterprise object is a fault (its data hasn’t yet been fetched


In my application, I have a ERXEC,  in which I did the following. 

EOModel model = EOModelGroup.defaultGroup().modelNamed("LDAPModel");
NSMutableDictionary<String, String> overrides = new NSMutableDictionary<String, String>();
overrides.takeValueForKey("ldap://localhost:389/cn=Contacts,o=xws", "serverUrl");
EODatabaseContext.forceConnectionWithModel(model, overrides,abEC);
groups = XWSContactsGroup.fetchAllXWSContactsGroups(abEC,
new NSArray(new Object[]{ERXSortOrdering.sortOrderingWithKey(XWSContactsGroup.CN, ERXSortOrdering.CompareAscending)}));

I change the connection dictionary of the model for 2 reasons, was the only documented way I found to do that in order to change the BASE search on LDAP(old question I post  on the list). And second,  so only that EC will have access to that level in the LDAP.

Anyway, as you know Im working with a AjaxSelectionList, which is working (so far), so when I select some item,  its the action binding is firing a method in which Im fetching the data for that particular item. Im doing the following.

NSArrray = contactLsits = XWSContact.fetchAllXWSContacts(abEC,XWSContact.PARENT.eq(selectedItem.cn),
new NSArray(new Object[]{ERXSortOrdering.sortOrderingWithKey(XWSContacts.CN, ERXSortOrdering.CompareAscending)}));

So I getting the array of contacts for the given group. ALL FINE, perfect. if I select another group form the list, then again I get a list of contacts for that new group, BUT, if I select the previous group in the list, I see in the LDAP console that I made a fetch again.

I thought I would get it from the EC without making a fetch, this behavior, make same think, that if somebody start just clicking between group items in the list, it will keep making fetchs to the server, isn't this dangerous? I mean in big proportions?

Thanks in advance.

Gustavo

 _______________________________________________
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: Question on fetching theory
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: compacting html, whitespaces
  • Next by Date: Re: Question on fetching theory
  • Previous by thread: Re: compacting html, whitespaces
  • Next by thread: Re: Question on fetching theory
  • Index(es):
    • Date
    • Thread