+ Start a Discussion
VisualForceVisualForce 

General Question __r relation

Hi..
 
I got too many soql error 501..
          
     In my class I am using __r (parent child relation) query..
 
Ex:
       Contact con=[select Id,Account__r.Name from Contact where Name='Test'];
 
Like that I am using so many query in my class.. and I got too many SOQL error 501..
 
      
       Contact con=[select Id,Account__r.Name from Contact where Name='Test'];
 
how many query rows count for above query internally.. whether its one or two..
 
 
 
      
hisrinuhisrinu
The query will be exactly only one not two.

  The problem in your case is, somewhere you are looping your query in for loop.
  So i.e. the reason it may give that problem.
VisualForceVisualForce
Thanks for ur reply...