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 protected]>
A : 
Copie à : [email protected], [email protected]
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 protected]> 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 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