Subquery in projection

338 views
Skip to first unread message

Filip Mamic

unread,
Oct 26, 2014, 9:17:14 AM10/26/14
to quer...@googlegroups.com
Hello,
I have query with projection and i need to use subquery to count team matches.

query.from(qMatch).where(builder)
               
.groupBy(queryStringPath).list(
               
Projections.constructor(TeamResultDto.class,
                       
new JPASubQuery().from(qTeam).where(qTeam.name.eq(qMatch.homeTeam.name)).count(),
                        queryStringPath
, qMatch.homeTeam.name.count())
       
);


I get : 
java.lang.IllegalArgumentException: Undeclared path 'match'. Add this path as a source to the query to be able to reference it.

When i reference match in where or from part of query, everything is ok. But with projections it doesn't work. (builder is not importat for this question so i didn't put it here).
Is this bug or i must reference it on some other way? 

timowest

unread,
Oct 26, 2014, 2:54:40 PM10/26/14
to quer...@googlegroups.com
Hi Filip.

This looks like a bug. Could you create a ticket for it?

Br,
Timo

Filip Mamic

unread,
Oct 26, 2014, 3:18:25 PM10/26/14
to quer...@googlegroups.com
Sure, where can i create ticket?

Timo Westkämper

unread,
Oct 26, 2014, 3:18:47 PM10/26/14
to Querydsl on behalf of Filip Mamic

On Sun, Oct 26, 2014 at 9:18 PM, Filip Mamic via Querydsl <querydsl+noreply-APn2wQfvboG-drf...@googlegroups.com> wrote:
Sure, where can i create ticket?

--
You received this message because you are subscribed to the Google Groups "Querydsl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to querydsl+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages