fix up getSimplePKFromQuery