title: How to return an empty Object rather than Null when doing a Left Join
body: <p>I have a field: "Country" of an Entity class that is optional. The country refers to a table containing a list of ids with country attributes.</p>
  
  <p>In order to include the rows in my table where no Country has been given I used:</p>
  
  <pre><code>.....createAlias("country_Id", "Co", Criteria.LEFT_JOIN);
  </code></pre>
  
  <p>I would prefer an empty Country object to be returned instead of just null for the country field of the Entity object.</p>
  
  <p>For starters is my approach getting all the table rows, those with/without a country correct?
  Or is there a better method?</p>
  
  <p>Finally would you advise creating an interceptor to turn null into a Empty Country Object? Otherwise I will just handle it in my code that handles the returned search results, by adding an IF(null) statement.</p>