{"action":"opened","issue":{"url":"https://api.github.com/repos/querydsl/querydsl/issues/1561","labels_url":"https://api.github.com/repos/querydsl/querydsl/issues/1561/labels{/name}","comments_url":"https://api.github.com/repos/querydsl/querydsl/issues/1561/comments","events_url":"https://api.github.com/repos/querydsl/querydsl/issues/1561/events","html_url":"https://github.com/querydsl/querydsl/issues/1561","id":106815866,"number":1561,"title":"querydsl 4 does not support subqueries in the select list","user":{"login":"robertandrewbain","id":3799239,"avatar_url":"https://avatars.githubusercontent.com/u/3799239?v=3","gravatar_id":"","url":"https://api.github.com/users/robertandrewbain","html_url":"https://github.com/robertandrewbain","followers_url":"https://api.github.com/users/robertandrewbain/followers","following_url":"https://api.github.com/users/robertandrewbain/following{/other_user}","gists_url":"https://api.github.com/users/robertandrewbain/gists{/gist_id}","starred_url":"https://api.github.com/users/robertandrewbain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertandrewbain/subscriptions","organizations_url":"https://api.github.com/users/robertandrewbain/orgs","repos_url":"https://api.github.com/users/robertandrewbain/repos","events_url":"https://api.github.com/users/robertandrewbain/events{/privacy}","received_events_url":"https://api.github.com/users/robertandrewbain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-16T16:57:38Z","updated_at":"2015-09-16T16:57:38Z","closed_at":null,"body":"In querydsl 3 you could perform the following sub-query:\r\n```sql\r\nSELECT (SELECT 'foo' FROM some_table)\r\nFROM   some_other_table;\r\n```\r\nby using a `StringExpression` and putting that in the select list. However querydsl 4 appears to have done away with the notion of sub-queries, which quite rightly bring it closer to SQL. However, now, using a query rather than a sub-query, the querydsl equivalent of `(SELECT 'foo' FROM some_table)` returns a String, rather than a `StringExpression` and therefore cannot be placed in the select list.\r\n\r\nUnless I'm missing something, querydsl 4 should be enhanced to support sub-queries, such as that shown above, in the select list."}}