[open-ils-commits] r12575 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Mar 18 11:03:33 EDT 2009
Author: scottmk
Date: 2009-03-18 11:03:31 -0400 (Wed, 18 Mar 2009)
New Revision: 12575
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
In searchPredicate(): make sure that there is only one
predicate at a time for a field (currently we silently
ignore anything but the first one).
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-03-18 14:55:16 UTC (rev 12574)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-03-18 15:03:31 UTC (rev 12575)
@@ -1999,7 +1999,12 @@
MODULENAME, osrfHashGet(field, "name") );
} else {
jsonObject* pred_node = jsonIteratorNext( pred_itr );
- if ( !(strcasecmp( pred_itr->key,"between" )) )
+
+ // Verify that there are no additional predicates
+ if( jsonIteratorHasNext( pred_itr ) ) {
+ osrfLogError( OSRF_LOG_MARK, "%s: Multiple predicates for field \"%s\"",
+ MODULENAME, osrfHashGet(field, "name") );
+ } else if ( !(strcasecmp( pred_itr->key,"between" )) )
pred = searchBETWEENPredicate( class, field, pred_node );
else if ( !(strcasecmp( pred_itr->key,"in" )) || !(strcasecmp( pred_itr->key,"not in" )) )
pred = searchINPredicate( class, field, pred_node, pred_itr->key, ctx );
More information about the open-ils-commits
mailing list