ftl.data.mongo.method.$$MongoRepositoryUpdateDocumentMethodBodyTemplateftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rxmicro-annotation-processor-data-mongo Show documentation
Show all versions of rxmicro-annotation-processor-data-mongo Show documentation
The RxMicro Annotation Processor internal module that generates Mongo DB components.
<#include "../mongo-lib.javaftl">
<#-- -------------------------------------------------------------------------------------------------------- -->
${createBsonVar('filter', FILTER)}
<#-- -------------------------------------------------------------------------------------------------------- -->
final Document update = new Document("$set", ${DOCUMENT_CONVERTER}.toDB(${DOCUMENT}, false));
<#-- -------------------------------------------------------------------------------------------------------- -->
final Publisher result = collection
.updateMany(
filter,
update,
new UpdateOptions().upsert(${UPSERT?c})
);
<@returnUpdateResult />