• 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
Re: Re: fetching on joined table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: fetching on joined table


  • Subject: Re: Re: fetching on joined table
  • From: email@hidden
  • Date: Thu, 14 Apr 2011 10:40:56 +0200 (CEST)
  • Message-context: email-message

Hi ,

Thank you everyone for your information about my problem.
It's true I just want to read my data, because for modification or recording, this side is already set.

To Chuck, I think that we can make everything with a framework ( WO) and even if it is difficult but there is always an issue.
 
To Joe, I do not necessarily execute SQL but just wondering if there is a way to do this in WO? Or make a stored procedure with my
complex SQL query  in the lower part and just call it in WO. It would avoid me to every new version of my database to touch my WO code.

I'm just looking for ways and John gave me a way


========================================

Message du : 13/04/2011
De : "John Huss " <email@hidden>
A :
Copie à : email@hidden, email@hidden
Sujet : Re: fetching on joined table


IF your data is read-only and you really, really want to use a custom SQL statement, then it's ok to fetch raw rows and set the SQL using a hint:

        String sqlQuery = ...


        NSMutableDictionary hints = new NSMutableDictionary();

        hints.setObjectForKey( sqlQuery, EODatabaseContext.CustomQueryExpressionHintKey);

        fetchSpec.setHints( hints );

        fetchSpec.setRawRowKeyPaths( ... )


        return editingContext.objectsWithFetchSpecification( fetchSpec );


If this is editable data then this is definitely NOT the way to do it.

John

On Wed, Apr 13, 2011 at 10:18 AM, Chuck Hill <email@hidden> wrote:
You will notice that Joe works at a rather well known university too.  :-)  I'd listen to his advice or decide to not use WO.

Chuck

On Apr 13, 2011, at 8:00 AM, Joe Little wrote:

Others will say similarly, but as someone who once used views, etc, you'll want to avoid these and stored procedures and build out all of this logic in EOF/Modeler and let WebObjects do it's thing. If you are executing SQL for results lists, you are likely trying too hard to outthink WO

 _______________________________________________
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

References: 
 >fetching on joined table (From: email@hidden)
 >Re: Re: fetching on joined table (From: email@hidden)
 >Re: Re: fetching on joined table (From: email@hidden)
 >Re: Re: fetching on joined table (From: email@hidden)
 >Re: fetching on joined table (From: Joe Little <email@hidden>)
 >Re: fetching on joined table (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: wotaskd fails with java.net.UnknownHostException
  • Next by Date: Reminder: Contributing to Project Wonder webcast
  • Previous by thread: Re: fetching on joined table
  • Next by thread: Re: fetching on joined table
  • Index(es):
    • Date
    • Thread