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

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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Aug 31, 2014

Member

Released in 3.4.3

Member

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