Class MergeOperation.MergeOperationTarget
java.lang.Object
org.springframework.data.mongodb.core.aggregation.MergeOperation.MergeOperationTarget
- Enclosing class:
- MergeOperation
Value Object representing the
If not stated explicitly via
into
field of a $merge
aggregation stage. If not stated explicitly via
inDatabase(String)
the collection is created
in the very same database. In this case into
is just a single String holding the collection
name. into: "target-collection-name"If the collection needs to be in a different database
into
will be a Document
like the following
{ into: {} }
- Since:
- 2.3
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptioncollection
(String collection) inDatabase
(String database) Optionally specify the target database if different from the source one.
-
Method Details
-
collection
- Parameters:
collection
- The output collection results will be stored in. Must not be null.- Returns:
- new instance of
MergeOperation.MergeOperationTarget
.
-
inDatabase
Optionally specify the target database if different from the source one.- Parameters:
database
- must not be null.- Returns:
- new instance of
MergeOperation.MergeOperationTarget
.
-