Updated in query parameters to use primary key of object if available.

Signed-off-by: Justin Wesley <justin@wesleyhome.com>