[jboss-jira] [JBoss JIRA] Commented: (JBAS-206) Include ORDER BY cols in SELECT clause
Michal Borowiecki (JIRA)
jira-events at lists.jboss.org
Mon Jul 23 11:23:47 EDT 2007
[ http://jira.jboss.com/jira/browse/JBAS-206?page=comments#action_12369744 ]
Michal Borowiecki commented on JBAS-206:
----------------------------------------
This bug is still present in the EJBQLToSQL92Compiler.
This dynamic JBoss QL works fine with the default compiler:
select distinct object(o) from TransactionRO o where o.account.accountId = ?1 and o.date >= ?2 order by o.user.login desc offset 0 limit 25
After switching to the EJBQLToSQL92Compiler, an exception is raised on posgresql:
org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
> Include ORDER BY cols in SELECT clause
> --------------------------------------
>
> Key: JBAS-206
> URL: http://jira.jboss.com/jira/browse/JBAS-206
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: CMP service
> Affects Versions: JBossAS-3.2.6 Final
> Reporter: SourceForge User
> Assigned To: Scott M Stark
> Fix For: Closed issues from sourceforge
>
>
> SourceForge Submitter: scoy .
> Some databases, Oracle in particular, require that columns named
> in an ORDER BY clause be included in the SELECT clause when
> SELECT DISTINCT is used.
> Here is some text from current Oracle documentation:
> Restrictions on the order_by_clause:
> * If you have specified the DISTINCT operator in this statement,
> then this clause cannot refer to columns unless they appear in the
> select list.
> * An order_by_clause can contain no more than 255 expressions.
> This can be worked around using on-find loading with load groups,
> but it sure would be useful if JBoss managed it for us.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list