New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orderBy does not support aliases declared in select #200

Closed
lallafa opened this Issue Jul 19, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@lallafa

lallafa commented Jul 19, 2012

I am trying to express this HQL query as Dslquery:

select length(name) as c from Author order by c asc

I tried something like:

  new HibernateQuery(session)
    .from(qAuthor)
    .orderBy(new NumberPath(Integer.class, "c").asc())
    .list(qAuthor.name.length().as("c"));

But this throws an Exception: Undeclared path 'c'. Add this path as a source to the query to be able to reference it

timowest added a commit that referenced this issue Jul 21, 2012

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Aug 4, 2012

Member

Released in 2.7.2

Member

timowest commented Aug 4, 2012

Released in 2.7.2

@timowest timowest closed this Aug 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment