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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to