BugsBiteBugs / sqlitepersistentobjects

Automatically exported from code.google.com/p/sqlitepersistentobjects
0 stars 0 forks source link

findBy broken due to variable parameter changes #81

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load an object
2. eg. findFirstByCriteria:@"where YOURCOLUM like '%iteria'" 

What is the expected output? What do you see instead?
-the object is not found
-actually the query string is beeing initialised and parts of it replaced 
internally by:
NSString *queryString = [[NSString alloc] initWithFormat:criteriaString 
arguments:argumentList]; 

- I didnt supply any more arguments for the argument list
- but my criteriaString contained %i
- the initWithFormat tries to insert an interger and yes that ends up in 
something like " where 
YOURCOLUM like '-3454121iteria' "

this seems to be due to:
// Added variadic ability to all criteria accepting methods -SLyons (10/03/2009)

Original issue reported on code.google.com by bastian.koell@gmail.com on 13 Mar 2010 at 10:32