Skip to content

Commit 0494247

Browse files
authored
DATACOUCH-526 - N1qlJoinResolver not escaping bucketNames with special characters (#291)
It escape the first bucket name, but not the second one. Co-authored-by: mikereiche <michael.reiche@couchbase.com>
1 parent 662a84b commit 0494247

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/springframework/data/couchbase/core/convert/join/N1qlJoinResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public static String buildQuery(CouchbaseTemplate template, N1qlJoinResolverPara
4949
}
5050
String useLKS = useLKSBuilder.length() > 0 ? "USE " + useLKSBuilder.toString() + " " : "";
5151

52-
String from = "FROM `" + template.getBucketName() + "` lks " + useLKS + joinType + " " + template.getBucketName()
53-
+ " rks";
52+
String from = "FROM `" + template.getBucketName() + "` lks " + useLKS + joinType + " `" + template.getBucketName()
53+
+ "` rks";
5454
String onLks = "lks." + template.getConverter().getTypeKey() + " = \""
5555
+ parameters.getEntityTypeInfo().getType().getName() + "\"";
5656
String onRks = "rks." + template.getConverter().getTypeKey() + " = \""

0 commit comments

Comments
 (0)