code: public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
  
          String[] columns;
          try
          {
              columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName);
          }
          catch (QueryException e)
          {
              columns = new String[0];
          }
  
          // if there are columns that map the given property.. the property exists, so we don't need to add anything to the sql
          return columns.length > 0 ? "FALSE" : "TRUE";
      }
docs: Render the SQL fragment that corresponds to this criterion.
  
  @param criteria The local criteria
  @param criteriaQuery The overal criteria query
  
  @return The generated SQL fragment
  @throws org.hibernate.HibernateException Problem during rendering.