Support where clauses for string and number ids.

Fixed broken tests.