Fabrice,

Yes, this is normal.  Fetch specifications only work directly against the database.

If you want to access EO's in the parent context before save, I suggest passing a global ID (it will be a temporary one) up to the parent.  This should allow you to get the object in the parent by getting faultForGlobalID (which will return the real object, not a fault).

Ken

On Mar 21, 2006, at 4:31 AM, Fabrice Pipart wrote:

Hi list !

I have a question that seems simple but I did not find any accurate information on this...
Is it possible to fetch EOs the following way :

childEc = new EOEditingContext(session().defaultEditingContext());
EOUtilities.createAndInsertInstance(childEc, "Day");
childEc.saveChanges();
EOFetchSpecification fs = new EOFetchSpecification("Day", qual, null);
NSArray days = childEc.objectsWithFetchSpecification(fs);

Should I be able to fetch the objects?
In my case it does not work.
It only works if I do a saveChanges on the parent ec (when then objects are really written in database), which of course I do not want to do.

Is this normal?
Is there a way to fetch those objects anyway? or I should just keep an array of them and look for the EO I am looking for in a "for" loop ?

Regards

Fabrice Pipart

www.icconsulting.mc

International Corporate Consulting
Palais de la Scala
1 avenue Henri Dunant
Suite 1155
MC - 98000 Monaco

Skype: fabrice.pipart
Tel.  +377 97 98 21 04 (direct)
Fax. +377 97 70 88 07


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
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