
ftl.data.mongo.method.$$MongoRepositoryUpdateEntityMethodBodyTemplateftl 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">
<#-- -------------------------------------------------------------------------------------------------------- -->
final Document filter = new Document("_id", ${ENTITY_CONVERTER}.getId(${ENTITY}));
<#-- -------------------------------------------------------------------------------------------------------- -->
final Document update = new Document("$set", ${ENTITY_CONVERTER}.toDB(${ENTITY}, false));
<#-- -------------------------------------------------------------------------------------------------------- -->
final Publisher result = collection
.updateMany(
filter,
update,
new UpdateOptions().upsert(${UPSERT?c})
);
<@returnUpdateResult />
© 2015 - 2025 Weber Informatics LLC | Privacy Policy