Adding support for getSingleResult.