Skip to content

Commit 72886bb

Browse files
committed
Back-out the breaking part of 1441 from 4_4_x.
n1ql.bucket will continue to be (collection != null ? collection : bucket) so that queries that referenced n1ql.bucket after being used on collections will still work. Closes #1462.
1 parent f052aa4 commit 72886bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/springframework/data/couchbase/repository/query/StringBasedN1qlQueryParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public StringBasedN1qlQueryParser(String bucketName, String scope, String collec
205205
*/
206206
public N1qlSpelValues createN1qlSpelValues(String bucketName, String scope, String collection, Class domainClass,
207207
String typeField, String typeValue, boolean isCount, String[] distinctFields, String[] fields) {
208-
String b = bucketName;
208+
String b = collection != null ? collection : bucketName;
209209
String keyspace = collection != null ? collection : bucketName;
210210
Assert.isTrue(!(distinctFields != null && fields != null),
211211
"only one of project(fields) and distinct(distinctFields) can be specified");

0 commit comments

Comments
 (0)