DATACOUCH-560 - Serialization of CouchbaseDocument and CouchbaseList.
Add support for saving document with lists and composed objects. Convert CouchbaseDocument/CouchbaseList to Map/List before saving.
This commit is contained in:
committed by
mikereiche
parent
dddee9fb82
commit
c7f12a2237
@@ -68,7 +68,7 @@ public class ReactiveInsertByIdOperationSupport implements ReactiveInsertByIdOpe
|
||||
return Mono.just(object).flatMap(o -> {
|
||||
CouchbaseDocument converted = template.support().encodeEntity(o);
|
||||
return template.getCollection(collection).reactive()
|
||||
.insert(converted.getId(), converted.getContent(), buildInsertOptions()).map(result -> {
|
||||
.insert(converted.getId(), converted.export(), buildInsertOptions()).map(result -> {
|
||||
template.support().applyUpdatedCas(object, result.cas());
|
||||
return o;
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ReactiveReplaceByIdOperationSupport implements ReactiveReplaceByIdO
|
||||
return Mono.just(object).flatMap(o -> {
|
||||
CouchbaseDocument converted = template.support().encodeEntity(o);
|
||||
return template.getCollection(collection).reactive()
|
||||
.replace(converted.getId(), converted.getContent(), buildReplaceOptions()).map(result -> {
|
||||
.replace(converted.getId(), converted.export(), buildReplaceOptions()).map(result -> {
|
||||
template.support().applyUpdatedCas(object, result.cas());
|
||||
return o;
|
||||
});
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ReactiveUpsertByIdOperationSupport implements ReactiveUpsertByIdOpe
|
||||
return Mono.just(object).flatMap(o -> {
|
||||
CouchbaseDocument converted = template.support().encodeEntity(o);
|
||||
return template.getCollection(collection).reactive()
|
||||
.upsert(converted.getId(), converted.getContent(), buildUpsertOptions()).map(result -> {
|
||||
.upsert(converted.getId(), converted.export(), buildUpsertOptions()).map(result -> {
|
||||
template.support().applyUpdatedCas(object, result.cas());
|
||||
return o;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user