Temporal query add condition only if primary_key check is enabled
Added id only primary key check to query condition
Merge pull request #326 from sagikazarmark/1.8/develop

1.8/develop