title: Using DAO calls inside another DAO - DAO dependency
body: <p>I have a basic question.</p>
  
  <p>I have been creating DAO with separation of concern. Each DAO concentrates on the BusinessObject in context. My question is on using one DAO method inside another DAO. I have assumed that is wrong but do not have enough data support.</p>
  
  <p>Here is the situation.</p>
  
  <pre><code>EmpDAO:
     getEmp(empId)
     getEmps(deptId)
     getEmps(deptName)
  </code></pre>
  
  <p>What are the issues of having the below implementation</p>
  
  <pre><code>getEmps(deptName):
      // Assume this is cached and there is no question of two N/w calls and having any gain by joins
      DeptDAO.getId(deptName)
      getEmps(deptId)
  </code></pre>
  
  <p>What can go wrong with using DeptDAO inside EmpDAO? Or What are the points because of which I should not have a DAO call inside another DAO.</p>
  
  <p>Regards
  Amod</p>