title: Querydsl null-safe concatenation
body: <p>Suppose you have the following data in table corresponding to the class <code>Person</code>, what is the correct way to search null-safely for the concatenation of fields <code>name1</code> and <code>name2</code>?</p>
  
  <pre><code>@Entity
  public class Person {
      Long id;
      String name1;
      String name2;
      // Getters and setters omitted for brevity
  }
  </code></pre>
  
  <pre>
  id |  name1  | name2   
  ------------------------
  1  |  Foo    | null
  2  |  null   | Bar
  3  |  Foo    | Bar
  </pre>
  
  <p>By default the concatentation of two columns results in <code>null</code> if either is null.</p>
  
  <pre><code>public List&lt;String&gt; nameConcatenations() {
      JPAQuery q = new JPAQuery(entityManager);
      QPerson person = QPerson.person;
      StringExpression nameConcatenation = person.name1.concat(person.name2);
      return q.from(person).list(nameConcatenation)
  }
  </code></pre>
  
  <p>The above code results in the following list:</p>
  
  <pre><code>null
  null
  FooBar
  </code></pre>