title: Display data in Liferay Search Container from different database tables : Liferay
body: <p>I have been using search container in liferay to display data from a table. Works well!!
  here is a snippet of code:</p>
  
  <pre><code>&lt;% 
  List&lt;testapp&gt; pendingApprovals = ActionClass.getPendingLeaveApplications();
  %&gt;
  &lt;liferay-ui:search-container delta="20" emptyResultsMessage="No Results Found"&gt;
      &lt;liferay-ui:search-container-results total="&lt;%= pendingApprovals.size() %&gt;"
         results="&lt;%= ListUtil.subList(pendingApprovals , searchContainer.getStart(), searchContainer.getEnd()) %&gt;" /&gt;
  
      &lt;liferay-ui:search-container-row keyProperty = "empId" modelVar="search"
          className="com.test.mis.portal.model.testapp"&gt;
          &lt;liferay-ui:search-container-column-text name='Leave Duration' value = '&lt;%=String.valueOf(search.getLeaveDuration())%&gt;'   href="" /&gt;
      &lt;/liferay-ui:search-container-row&gt;
  
      &lt;liferay-ui:search-iterator/&gt;
  &lt;/liferay-ui:search-container&gt;
  </code></pre>
  
  <p>Using the above code I display data from the testapp table based on some condition.
  In the same code I would like to add a row and display data. The data for this row should come from another table. In short I want to display data using search container from two different database tables.
  Is it possible to do? My requirement is such that data comes from two different tables</p>
  
  <p>EDITED SECTION WITH REQUIREMENT
  I have Employee table with some fields
  I have another table Leave with some Fields.
  empId is in Leave table which maps to Employee table.</p>
  
  <p>I have a search container whicg displays the data from the Leave table only if the leave is pending
  I want to display only those fields from Employee table which match with Leave table and satisfy the above condition.</p>