Signed-off-by: Mike Rylander <mrylander@gmail.com>
buffer_fadd(
_p,
"\"%s\".%s IS NULL",
- class_info->class_name,
+ class_info->alias,
osrfHashGet( field, "name" )
);
pred = buffer_release( _p );
const char* direction =
jsonObjectGetString( jsonObjectGetKeyConst( order_spec, "direction" ) );
if( direction ) {
- if( direction[ 0 ] || 'D' == direction[ 0 ] )
+ if( direction[ 0 ] && ( 'd' == direction[ 0 ] || 'D' == direction[ 0 ] ) )
OSRF_BUFFER_ADD( order_buf, " DESC" );
else
OSRF_BUFFER_ADD( order_buf, " ASC" );