EOF-Modeling-Fetch Specifications

Last modified by Pascal Robert on 2010/09/11 23:47

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);