Hi Michael,
I agree with your plan. We should temporarily disable the change for
1519 and then update 2084 and downgrade it to a P3. We can then look at
2084 with somewhat less urgency.
The code you have sent looks good. Please feel free to check it in.
-Tom
Michael Bouschen wrote:
>Hi Tom,
>
>some news about issue 2084 "Generated SQL uses wrong alias for orderby
>clause" (https://glassfish.dev.java.net/issues/show_bug.cgi?id=2084).
>Meanwhile there is a forum posting describing the same problem:
>http://forums.java.net/jive/thread.jspa?threadID=22164&tstart=0
>
>I figured out the issue only occurs if the named query is mapped to a
>ReadAllQuery instance, so the generated SQL is correct when using a
>ReportQuery. This means my change for 1519 "JPQL: create a ReadAllQuery
>for simple queries" exposed this problem.
>
>I propose I disable the code in the query compiler creating a
>ReadAllQuery for simple queries. So for the time being the query
>compiler would always generate a ReportQuery instance for a JPQL SELECT
>query. Please note, this change allows to run the named query as
>described in issue 2084, but it does not fix the runtime issue of the
>invalid SQL for a ReadAllQuery. So I would like to keep 2084 open, but
>maybe it is ok to downgrade it to a P3.
>
>What do you think?
>
>Regards Michael
>
>