title: How to verify if a field is an empty string with GORM?
body: <p>I have a GORM query and I need to make it avoid a field which may be a empty string for legacy system questions.</p>
  
  <p>Currently, my query is:</p>
  
  <pre><code>def things = Thing.withCriteria{
      resultTransformer CriteriaSpecification.ALIAS_TO_ENTITY_MAP
      createAlias 'factor', 'f'
      eq 'active', true
      isNotNull 'title' // this field may be an empty string
      isNotNull 'content' // this field also may be an empty string
      // &lt;-- and here I'd like to include sth like isEmpty 'title'
      not {
          inList 'f.id', factors
      }
      projections{
          property 'id'       , 'id'
          property 'f.name'   , 'name'
          property 'title'    , 'title'
          property 'content'  , 'content'
          property 'f.id'     , 'factorId'
      }           
  }
  </code></pre>
  
  <p>I didn't find any solution in the docs, but I have a feeling that this solution should be with pure SQL. Is it possible? Any suggestion?</p>