From 485bb90a3442bca07084fc0e2d9728b2987d4295 Mon Sep 17 00:00:00 2001 From: mikereiche Date: Tue, 11 Oct 2022 12:51:44 -0700 Subject: [PATCH] Fix handling of collections in N1qlJoinResolver. Closes #1566. --- .../data/couchbase/core/convert/join/N1qlJoinResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/couchbase/core/convert/join/N1qlJoinResolver.java b/src/main/java/org/springframework/data/couchbase/core/convert/join/N1qlJoinResolver.java index 4efd116b2..63c152a60 100644 --- a/src/main/java/org/springframework/data/couchbase/core/convert/join/N1qlJoinResolver.java +++ b/src/main/java/org/springframework/data/couchbase/core/convert/join/N1qlJoinResolver.java @@ -145,7 +145,7 @@ static KeySpacePair getKeySpacePair(String bucketName, String scope, String coll // Use the lhScope and lhCollection for the entity. The rhs is just the bucket. return new KeySpacePair(lhCollection, x(i(bucketName) + "." + i(lhScope) + "." + i(lhCollection)), // null, i(bucketName)); - } else if (lhCollection != null && rhCollection == null) { + } else if (lhCollection == null && rhCollection != null) { // the lhs does not have a collection (or scope), but rhs does have a collection // Using the same (default) scope for the rhs would mean specifying a // non-default collection in a default scope - which is not allowed.