From b0d96fc52e6d0c8348ba4fd10043c61e348e445a Mon Sep 17 00:00:00 2001 From: Michael Reiche <48999328+mikereiche@users.noreply.github.com> Date: Tue, 11 Oct 2022 09:55:57 -1000 Subject: [PATCH] Fix handling of collections in N1qlJoinResolver. (#1587) 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 4efd116b..63c152a6 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 @@ public class N1qlJoinResolver { // 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.