diff --git a/build.gradle b/build.gradle index efe88336..c5f24407 100644 --- a/build.gradle +++ b/build.gradle @@ -62,8 +62,6 @@ dependencies { compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" compile "org.slf4j:slf4j-api:$slf4jVersion" compile "org.slf4j:jcl-over-slf4j:$slf4jVersion" - testRuntime "log4j:log4j:$log4jVersion" - testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion" // Testing testCompile("org.springframework:spring-test:$springVersion") { @@ -75,7 +73,9 @@ dependencies { testCompile "org.mockito:mockito-core:$mockitoVersion" testCompile "javax.annotation:jsr250-api:1.0", optional + testRuntime "log4j:log4j:$log4jVersion" testCompile "org.apache.derby:derbyLocale_zh_TW:10.9.1.0" + testRuntime "org.slf4j:slf4j-log4j12:$slf4jVersion" } sourceCompatibility = 1.6 diff --git a/src/main/java/org/springframework/data/gemfire/repository/query/StringBasedGemfireRepositoryQuery.java b/src/main/java/org/springframework/data/gemfire/repository/query/StringBasedGemfireRepositoryQuery.java index ee7f908d..a239134c 100644 --- a/src/main/java/org/springframework/data/gemfire/repository/query/StringBasedGemfireRepositoryQuery.java +++ b/src/main/java/org/springframework/data/gemfire/repository/query/StringBasedGemfireRepositoryQuery.java @@ -26,7 +26,9 @@ import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; +import com.gemstone.gemfire.cache.query.SelectResults; import com.gemstone.gemfire.cache.query.internal.ResultsBag; +import com.gemstone.gemfire.cache.query.internal.ResultsCollectionPdxDeserializerWrapper; /** * {@link GemfireRepositoryQuery} using plain {@link String} based OQL queries. @@ -118,6 +120,10 @@ public class StringBasedGemfireRepositoryQuery extends GemfireRepositoryQuery { */ private Collection toCollection(Object source) { + if (source instanceof SelectResults) { + return ((SelectResults) source).asList(); + } + if (source instanceof ResultsBag) { ResultsBag bag = (ResultsBag) source; return bag.asList();