Skip to content
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

Two or more any() paths in list() expressions does not work #880

Closed
cnstntn opened this issue Aug 5, 2014 · 1 comment
Closed

Two or more any() paths in list() expressions does not work #880

cnstntn opened this issue Aug 5, 2014 · 1 comment
Labels
bug
Milestone

Comments

@cnstntn
Copy link

@cnstntn cnstntn commented Aug 5, 2014

Exception is thrown when executing query with two any() paths in the list() expression.
e.g.

new JPAQuery(entityManager).from(order).list(order.items.any().categoryId, order.items.any().categoryName);


Exception:
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: . near line 1, column 34 [select any elements(order1.items).categoryId, any elements(order1.items).categoryName
from com.my.domain.Order order1]

If there is only one column in the projection ".list(order.items.any().categoryId)" everything works fine.

Mapping:
@Entity
@Table(name = "ORDERS")
public class Order {


...
@OneToMany(mappedBy = "order")
private List items;
...


}

Thank you.

@timowest timowest added the bug label Aug 5, 2014
@timowest timowest added this to the 3.4.3 milestone Aug 8, 2014
@timowest timowest closed this in #888 Aug 9, 2014
@timowest
Copy link
Member

@timowest timowest commented Aug 31, 2014

Released in 3.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.