Uploaded image for project: 'Hibernate OGM'
  1. OGM-984

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 5.0.0.Beta1
    • Fix Version/s: None
    • Component/s: mongodb
    • Labels:
      None
    • Environment:
      all
    • Last commented by a user?:
      true
    • Sprint:
      OGM - 2016-02

      Description

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

      SELECT COUNT(e) FROM Foo e
      

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

      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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                twwwt Thorsten Möller
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: