Re: fetching on joined table
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