[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5199) Formula should use aliases in order by

Stephane Epardaud (JIRA) noreply at atlassian.com
Thu May 6 06:56:06 EDT 2010


Formula should use aliases in order by
--------------------------------------

                 Key: HHH-5199
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5199
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.3.1
            Reporter: Stephane Epardaud


Same bug as HB-958 but filed for hibernate 3. Not every database supports formulas or functions in WHERE clauses, and while we would love to get rid of them, it's not always realistic.

It should not be hard to reuse the alias generated for formulas from the SELECT clause.

Reminder:

- This does not work on every DB:
{noformat}
SELECT length(id) FROM t ORDER BY length(id);
{noformat}
- This works on several DBs:
{noformat}
SELECT length(id) AS l FROM t ORDER BY l;
{noformat}

If there are any DBs where hibernate is broken because of that, it should be a Dialect feature.

In the original bug report, Gavin mentioned trivial workarounds. It would be helpful to show them in the bug report too, since they might not be obvious (I've no clue for instance).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list