RE: refreshing data...?
RE: refreshing data...?
- Subject: RE: refreshing data...?
- From: "Ren, Kevin" <email@hidden>
- Date: Tue, 31 Mar 2009 15:39:21 +1300
- Thread-topic: refreshing data...?
1.
ec = (EOEditingContext)(session().defaultEditingContext());
contactList =
(NSArray)EOUtilities.objectsForEntityNamed(ec,"Contact");
2.
EOFetchSpecification fs = new
EOFetchSpecification("Contact",qual,nameOrderingArray);
fs.setRefreshesRefetchedObjects(true);
contactList =
session().defaultEditingContext().objectsWithFetchSpecification(fs);
If qual and nameOrderingArray are null in option 2, I think they are
same,
kevin
-----Original Message-----
From: webobjects-dev-bounces+kevin.ren=email@hidden
[mailto:webobjects-dev-bounces+kevin.ren=email@hidden.c
om] On Behalf Of Theodore Petrosky
Sent: Tuesday, 31 March 2009 3:18 p.m.
To: email@hidden
Subject: refreshing data...?
I am a relative neophyte using webobjects. I am also just starting with
wonder.... lots of fun.
I have a database driven app that I sometimes update through my cocoa
app. I would like to do my fetch and be sure I get fresh queries from
the database? I am doing my queries like this:
contactList = Contact.fetchNotDeleted(contactEO);
it returns an array. my problem is that if I were to update the table
from my cocoa app this array is not coming from the database but from
cache. I want to set up to do a query from the database all the time.
is there a simple solution?
Ted
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
ional.co.nz
This email sent to email@hidden
"This communication is confidential and may contain privileged and/or copyright material. If you are not the intended recipient you must not use, disclose, copy or retain it. If you have received it in error please immediately notify me by return email, delete the emails and destroy any hard copies. ANZ National Bank Limited does not guarantee the integrity of this communication, or that it is free from errors, viruses or interference."
_______________________________________________
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