+ Start a Discussion

Batch Apex Query returning less records


I have a query written in a normal apex class and the same query is used in a Batch Apex class.

The query in normal apex class is returning 7 rows.

Whereas the query in batch apex class is returning 2 rows.


I have printed the query in both cases and it is exactly the same.


Is this a known issue of SFDC or am i doing some thing wrong.


The apex class is a controller which is called by a visualforce page. It has "public with sharing" keywords against it.