I have stored below data in couchbase:
When I am reading I will have key in second row i.e. 0001410005……………sku1 as input and based on this key I’ll retrieve guid; value of which is the key for first row i.e. <PriceInvRspRow1 .toString()>
Note that the value in first row is serializedDocument data not JSONDocument.
I have written below query to retrieve this data:
Statement fluentStatement =
Select.select("*")
//Expression.i escapes an expression with backticks
.from(i(dsBucket.name()))
//Expression.x creates an expression token that can be manipulated
//Expression.s creates a string literal
.where(x(“META(default).id”).eq(x( Select.select(“guid”)
//Expression.i escapes an expression with backticks
.from(i(dsBucket.name()))
//Expression.x creates an expression token that can be manipulated
//Expression.s creates a string literal
.where(x(“META(default).id”).eq("$1"))
)));
But I am getting error:
[{“msg”:“Duplicate subquery alias default”,“code”:4020}]
Can you plz tell me where I am doing wrong and what is the best way to achieve this.
Thanks in advance.