Dashboard > WebObjects > Home > Programming__WebObjects-EOF-Modeling-Fetch Specifications
  WebObjects Log In View a printable version of the current page.  
  Programming__WebObjects-EOF-Modeling-Fetch Specifications
Added by Chris Meyer, last edited by Pascal Robert on Jul 14, 2008  (view change)
Labels: 
(None)

Fetch Specifications

Writing Expressions

Fetch specifications should be written so that any variables appearing in the specification occur on the right side of binary operators. For instance, use "name = $name" instead of "$name = name".

When comparing binary values, use 1,0 instead of "true","false" or "yes","no".

When comparing binary values to a variable, use "1=$variable" instead of "$variable=1".

If you use the "like" or "caseInsensitiveLike" operators, don't forget to add the wildcard in the value you pass to the bindings. For example, if you want to find all names beginning with "rob", use the following binding:

NSMutableDictionary<String,Object> bindings = new NSMutableDictionary<String,Object>();
bindings.takeValueForKey("rob" + '*', Member.NAME_KEY);

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators