Uploaded image for project: 'Spring Data GemFire'
  1. Spring Data GemFire
  2. SGF-534

Fix ordered GemfireRepository.findAll(Sort) queries

    XMLWordPrintable

Details

    • Kay M1

    Description

      Currently, when a developer defines an application GemfireRepository interface extension type and calls the findAll(:Sort) query method, SDG incorrectly formats the GemFire/Geode OQL query statement, and throws the following Exception...

      java.lang.UnsupportedOperationException: non-distinct order-by not yet supported
      	at com.gemstone.gemfire.cache.query.internal.CompiledSelect.prepareEmptyResultSet(CompiledSelect.java:824)
      	at com.gemstone.gemfire.cache.query.internal.CompiledSelect.doIterationEvaluate(CompiledSelect.java:556)
      	at com.gemstone.gemfire.cache.query.internal.CompiledSelect.evaluate(CompiledSelect.java:284)
      	at com.gemstone.gemfire.cache.query.internal.DefaultQuery.executeUsingContext(DefaultQuery.java:529)
      	at com.gemstone.gemfire.cache.query.internal.DefaultQuery.execute(DefaultQuery.java:365)
      	at org.springframework.data.gemfire.GemfireTemplate.find(GemfireTemplate.java:299)
      	at org.springframework.data.gemfire.repository.support.SimpleGemfireRepository.findAll(SimpleGemfireRepository.java:166)
      

      The problem is caused by the fact that GemFire does not support non-unique queries with an ORDER BY clause, and SDG fails to correctly include the DISTINCT OQL Query keyword in the statement.

      Attachments

        Activity

          People

            jblum John Blum
            jblum John Blum
            Oliver Drotbohm Oliver Drotbohm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 1d
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified