title: JPA JPQL request with select and Concat
body: <p>I have two entities </p>
  
  <pre><code>@Entity
  @Table(name = "users")
  public class User extends Model {
    public String name;
  
    @ManyToMany
    public List&lt;Role&gt; roles;
  }
  </code></pre>
  
  <p>And </p>
  
  <pre><code>@Entity
  @Table(name = "roles")
  public class Role extends Model {
    public String name;
  }
  </code></pre>
  
  <p>Tables contains</p>
  
  <pre><code>Table Users    |        |   Table Roles   |           |Table Users_roles    |
  id    | Name   |        | id    | Name    |           |users_id  | roles_id |
  1     | User 1 |        | 1     | CEO     |           |    2     |    1     |
  2     | User 2 |        | 2     | Manager |           |    2     |    2     |
  3     | User 3 |                                      |    3     |    1     |
  </code></pre>
  
  <p>I want to make the following query (ok with PostgreSql 9.1.12)</p>
  
  <pre><code>SELECT u.*, array_to_string(array_agg(r.name ORDER BY r.name ASC), ' / ')
    FROM  users u
    LEFT OUTER JOIN users_roles ur ON u.id=ur.users_id
    FULL JOIN roles r ON r.id=ur.roles_id
    GROUP BY u.id, ur.users_id
    ORDER BY array_to_string ASC
  </code></pre>
  
  <p>I have the result I Want</p>
  
  <pre><code>User name | roles
  User 1    |          
  User 3    | CEO        
  User 2    | CEO / MANAGER         
  </code></pre>
  
  <p>Can you help me to get the JPA syntax for this request?</p>