Make getWhereString function sane by not appending a limit clause