I am using ‘MappingCouchbaseConverter’ from spring library like below
CouchbaseDocument target = new CouchbaseDocument();
“mybucketName”).reactive(), null, target.getContent());
I am using transactions.
above code writes a binary data insteed of JSON, can anyone please help, how can I write the Json insteed of binary object
I have no idea why this would be happening, so I’ll cast a wide net and ask lots of questions
What version of Spring Data Couchbase?
What version of the
Can you share an example of what this “binary object” looks like?
What is returned by
It looks like you’re passing
null for the document ID… is that correct?
In addition to David’s questions, can you please provide a more complete example showing the full transactions.run() code? If you can create a standalone project you can share, that would be even more helpful.
I see two things that jump out as being possibly incorrect:
- The null document id that David mentioned.
- With reactive programming you will generally return a chain of reactive events, e.g. “return ctx.insert().concatMap(insertResult → …”). It doesn’t look like that is happening. Do you require the reactive API? Its main use is for performing the transaction in parallel - if you don’t need that power, then the blocking API is simpler to use.