Hi, Emmanuel,

I'm not sure what problem you're having with fetching from the Application class, but the one that comes most immediately to mind is that you don't have a default EOEditingContext in the Application class like that provided by your Session class and usable from any of your Session based WOComponents.

To solve that problem, just create your own but remember to lock it before using it or any of the EOs associated with it and to unlock it when you're done.

Typical code would look something like this:

    EOEditingContext ec = new EOEditingContext();

    try {
        ec.lock();

EOFetchSpecification fs = new EOFetchSpecification ("myEntity", null, null);
        NSArray myThings = ec.objectsWithFetchSpecification(fs);

        ...
        //  Do some things with myThings...

        ec.saveChanges();

    } finally {
        ec.unlock();
    }

Regards,
Jerry

On Dec 23, 2007, at 10:25 AM, Emmanuel KOPP wrote:

Hi,

I developping a game with WO.

How I can do a Fetch in Application Class and excecute a saveChanges on this fetch in Application Class ?

an idea ??

Thanks

Manu


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    [EMAIL PROTECTED]
    203 278-4085        office



_______________________________________________
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