We're updating the issue view to help you get more done. 

JP-QL aggregate operator doesn't seem to be supported for MongoDB

Description

I tried to execute a simple JP-QL query using COUNT aggregation:

1 SELECT COUNT(e) FROM Foo e

This results in the following exception (using Wildly 10):

1 2 3 4 5 6 7 8 9 10 11 12 Caused by: java.lang.IndexOutOfBoundsException (Index: 0) at java.util.Collections$EmptyList.get(Collections.java:4454) at org.hibernate.ogm.query.impl.OgmQueryLoader.listOfArrays(OgmQueryLoader.java:110) at org.hibernate.ogm.query.impl.OgmQueryLoader.list(OgmQueryLoader.java:73) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:501) at org.hibernate.ogm.query.impl.OgmQueryTranslator.list(OgmQueryTranslator.java:127) at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:216) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1326) at org.hibernate.internal.QueryImpl.list(QueryImpl.java:87) at org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:593) at org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:516) at ch.sbi.forte.persistence.dao.ProductManager.count(ProductManager.java:152)

Am I right that aggregation operators are currently not supported for MongoDB? If so, could someone outline where I would need to start to implement this. Any hints appreciated.

Environment

all

Status

Assignee

Unassigned

Reporter

Thorsten Möller

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Sprint

Affects versions

5.0.0.Beta1

Priority

Major