Open jeffrymorris opened 3 years ago
@jeffrymorris
I was waiting to fix this on the resolution to this issue since the consensus was that the SDK should be doing the backtick wrapping. I didn't want to come back and undo the change later.
@brantburnett -
I guess I dropped the ball on this one - looks like this one should have been in the queue and released long ago. I'll assign the ticket to 3.2.1 and get it resolved.
-Jeff
Linked to wrong issue, reopening
While upgrading the CouchbaseNetClient dependency to 3.2.0, a number of integration tests (JoinTests_InnerJoin_IndexJoin, JoinTests_LeftJoin_IndexJoin, etc) are failing with ParsingFailureExceptions. For example the request:
Fails with the following response:
The issue appears to be that the bucket name is not being escaped with back ticks: "beer-sample" should be
"`beer-sample`"
. This can be confirmed by running the query in the request in the query console in CB.Note this happens for 3.0.7 and for 3.2.0 versions and I suspect all 3.X versions.
@brantburnett shouldn't this escaping be happening by the
N1QlHelpers.EscapeIdentifier
: https://github.com/couchbaselabs/Linq2Couchbase/blob/master/Src/Couchbase.Linq/QueryGeneration/N1QLQueryModelVisitor.cs#L137Note that you may have to drop brewer_id index first: DROP INDEX brewery_id on `beer-sample
Jeff