buildWhere for objects fix