79526253

Date: 2025-03-21 17:53:22
Score: 1.5
Natty:
Report link

I answered this on your post to forums couchbase com. Since stackoverflow will spank me if I post the link, here's my post copy/pasted from there

ctx.insert(collection,

I don’t think your issue is transaction related.
Avoid mixing-and-matching the Couchbase Java SDK with Spring Data Couchbase. Spring Data Couchbase expects every document to have a _class property, and uses that as a predicate for all operations that are not -ById. So where you’ve used the Java SDK to insert a TransactionSubLedgerEntity document, it does not have a _class property. So when spring data queries with "SELECT … FROM … WHERE … AND _class = “com.example.TransactionSubLedgerEntity” it will only find documents inserted by Spring Data Couchbase (which have the _class property).
If you attempt to retrieve the document that you inserted using findById() - I believe you will find it.
There are exceptions, but by and large - that’s the deal.

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: mn_test347