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

Re: fetching on joined table


  • Subject: Re: fetching on joined table
  • From: John Huss <email@hidden>
  • Date: Wed, 13 Apr 2011 10:51:49 -0500

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: fetching on joined table
  • Next by Date: Re: wotaskd fails with java.net.UnknownHostException
  • Previous by thread: Re: fetching on joined table
  • Next by thread: Re: Re: fetching on joined table
  • Index(es):
    • Date
    • Thread