diff --git a/pom.xml b/pom.xml
index 340e6922b4..43a078c9cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-mongodb-parent
- 2.2.0.BUILD-SNAPSHOT
+ 2.2.0.DATAMONGO-2296-SNAPSHOT
pom
Spring Data MongoDB
diff --git a/spring-data-mongodb-benchmarks/pom.xml b/spring-data-mongodb-benchmarks/pom.xml
index bb7d9f03cc..24a859ddd1 100644
--- a/spring-data-mongodb-benchmarks/pom.xml
+++ b/spring-data-mongodb-benchmarks/pom.xml
@@ -7,7 +7,7 @@
org.springframework.data
spring-data-mongodb-parent
- 2.2.0.BUILD-SNAPSHOT
+ 2.2.0.DATAMONGO-2296-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml
index b32dcba387..e47ec9b3e0 100644
--- a/spring-data-mongodb-distribution/pom.xml
+++ b/spring-data-mongodb-distribution/pom.xml
@@ -14,7 +14,7 @@
org.springframework.data
spring-data-mongodb-parent
- 2.2.0.BUILD-SNAPSHOT
+ 2.2.0.DATAMONGO-2296-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml
index b611cf01a8..345bbd90ab 100644
--- a/spring-data-mongodb/pom.xml
+++ b/spring-data-mongodb/pom.xml
@@ -11,7 +11,7 @@
org.springframework.data
spring-data-mongodb-parent
- 2.2.0.BUILD-SNAPSHOT
+ 2.2.0.DATAMONGO-2296-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
index c71eada662..2b7e564529 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java
@@ -419,7 +419,7 @@ public MongoConverter getConverter() {
@Override
public CloseableIterator stream(final Query query, final Class entityType) {
- return stream(query, entityType, operations.determineCollectionName(entityType));
+ return stream(query, entityType, getCollectionName(entityType));
}
/*
@@ -565,7 +565,7 @@ public T execute(DbCallback action) {
public T execute(Class> entityClass, CollectionCallback callback) {
Assert.notNull(entityClass, "EntityClass must not be null!");
- return execute(operations.determineCollectionName(entityClass), callback);
+ return execute(getCollectionName(entityClass), callback);
}
/*
@@ -643,7 +643,7 @@ public MongoCollection createCollection(Class entityClass,
() -> operations.forType(entityClass).getCollation()) //
.map(options::collation).orElse(options);
- return doCreateCollection(operations.determineCollectionName(entityClass), convertToDocument(options, entityClass));
+ return doCreateCollection(getCollectionName(entityClass), convertToDocument(options, entityClass));
}
/*
@@ -685,7 +685,7 @@ public MongoCollection getCollection(final String collectionName) {
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#getCollection(java.lang.Class)
*/
public boolean collectionExists(Class entityClass) {
- return collectionExists(operations.determineCollectionName(entityClass));
+ return collectionExists(getCollectionName(entityClass));
}
/*
@@ -713,7 +713,7 @@ public boolean collectionExists(final String collectionName) {
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#dropCollection(java.lang.Class)
*/
public void dropCollection(Class entityClass) {
- dropCollection(operations.determineCollectionName(entityClass));
+ dropCollection(getCollectionName(entityClass));
}
/*
@@ -749,7 +749,7 @@ public IndexOperations indexOps(String collectionName) {
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#indexOps(java.lang.Class)
*/
public IndexOperations indexOps(Class> entityClass) {
- return new DefaultIndexOperations(this, operations.determineCollectionName(entityClass), entityClass);
+ return new DefaultIndexOperations(this, getCollectionName(entityClass), entityClass);
}
/*
@@ -765,7 +765,7 @@ public BulkOperations bulkOps(BulkMode bulkMode, String collectionName) {
* @see org.springframework.data.mongodb.core.ExecutableInsertOperation#bulkOps(org.springframework.data.mongodb.core.BulkMode, java.lang.Class)
*/
public BulkOperations bulkOps(BulkMode bulkMode, Class> entityClass) {
- return bulkOps(bulkMode, entityClass, operations.determineCollectionName(entityClass));
+ return bulkOps(bulkMode, entityClass, getCollectionName(entityClass));
}
/*
@@ -800,7 +800,7 @@ public ScriptOperations scriptOps() {
@Nullable
@Override
public T findOne(Query query, Class entityClass) {
- return findOne(query, entityClass, operations.determineCollectionName(entityClass));
+ return findOne(query, entityClass, getCollectionName(entityClass));
}
@Nullable
@@ -825,7 +825,7 @@ public T findOne(Query query, Class entityClass, String collectionName) {
@Override
public boolean exists(Query query, Class> entityClass) {
- return exists(query, entityClass, operations.determineCollectionName(entityClass));
+ return exists(query, entityClass, getCollectionName(entityClass));
}
@Override
@@ -856,7 +856,7 @@ public boolean exists(Query query, @Nullable Class> entityClass, String collec
*/
@Override
public List find(Query query, Class entityClass) {
- return find(query, entityClass, operations.determineCollectionName(entityClass));
+ return find(query, entityClass, getCollectionName(entityClass));
}
/*
@@ -877,7 +877,7 @@ public List find(Query query, Class entityClass, String collectionName
@Nullable
@Override
public T findById(Object id, Class entityClass) {
- return findById(id, entityClass, operations.determineCollectionName(entityClass));
+ return findById(id, entityClass, getCollectionName(entityClass));
}
@Nullable
@@ -899,7 +899,7 @@ public T findById(Object id, Class entityClass, String collectionName) {
*/
@Override
public List findDistinct(Query query, String field, Class> entityClass, Class resultClass) {
- return findDistinct(query, field, operations.determineCollectionName(entityClass), entityClass, resultClass);
+ return findDistinct(query, field, getCollectionName(entityClass), entityClass, resultClass);
}
/*
@@ -986,7 +986,7 @@ private static Class> getMostSpecificConversionTargetType(Class> userType, C
@Override
public GeoResults geoNear(NearQuery near, Class entityClass) {
- return geoNear(near, entityClass, operations.determineCollectionName(entityClass));
+ return geoNear(near, entityClass, getCollectionName(entityClass));
}
@Override
@@ -1008,7 +1008,7 @@ public GeoResults geoNear(NearQuery near, Class> domainType, String col
Assert.notNull(returnType, "ReturnType must not be null!");
String collection = StringUtils.hasText(collectionName) ? collectionName
- : operations.determineCollectionName(domainType);
+ : getCollectionName(domainType);
String distanceField = operations.nearQueryDistanceFieldName(domainType);
Aggregation $geoNear = TypedAggregation.newAggregation(domainType, Aggregation.geoNear(near, distanceField))
@@ -1040,7 +1040,7 @@ public GeoResults geoNear(NearQuery near, Class> domainType, String col
@Override
public T findAndModify(Query query, Update update, Class entityClass) {
return findAndModify(query, update, new FindAndModifyOptions(), entityClass,
- operations.determineCollectionName(entityClass));
+ getCollectionName(entityClass));
}
@Nullable
@@ -1052,7 +1052,7 @@ public T findAndModify(Query query, Update update, Class entityClass, Str
@Nullable
@Override
public T findAndModify(Query query, Update update, FindAndModifyOptions options, Class entityClass) {
- return findAndModify(query, update, options, entityClass, operations.determineCollectionName(entityClass));
+ return findAndModify(query, update, options, entityClass, getCollectionName(entityClass));
}
@Nullable
@@ -1122,7 +1122,7 @@ public T findAndReplace(Query query, S replacement, FindAndReplaceOptions
@Nullable
@Override
public T findAndRemove(Query query, Class entityClass) {
- return findAndRemove(query, entityClass, operations.determineCollectionName(entityClass));
+ return findAndRemove(query, entityClass, getCollectionName(entityClass));
}
@Nullable
@@ -1142,7 +1142,7 @@ public T findAndRemove(Query query, Class entityClass, String collectionN
public long count(Query query, Class> entityClass) {
Assert.notNull(entityClass, "Entity class must not be null!");
- return count(query, entityClass, operations.determineCollectionName(entityClass));
+ return count(query, entityClass, getCollectionName(entityClass));
}
@Override
@@ -1296,7 +1296,7 @@ public Collection insert(Collection extends T> batchToSave, Class> en
Assert.notNull(batchToSave, "BatchToSave must not be null!");
- return (Collection) doInsertBatch(operations.determineCollectionName(entityClass), batchToSave,
+ return (Collection) doInsertBatch(getCollectionName(entityClass), batchToSave,
this.mongoConverter);
}
@@ -1557,7 +1557,7 @@ public Object doInCollection(MongoCollection collection) throws MongoE
@Override
public UpdateResult upsert(Query query, Update update, Class> entityClass) {
- return doUpdate(operations.determineCollectionName(entityClass), query, update, entityClass, true, false);
+ return doUpdate(getCollectionName(entityClass), query, update, entityClass, true, false);
}
@Override
@@ -1575,7 +1575,7 @@ public UpdateResult upsert(Query query, Update update, Class> entityClass, Str
@Override
public UpdateResult updateFirst(Query query, Update update, Class> entityClass) {
- return doUpdate(operations.determineCollectionName(entityClass), query, update, entityClass, false, false);
+ return doUpdate(getCollectionName(entityClass), query, update, entityClass, false, false);
}
@Override
@@ -1593,7 +1593,7 @@ public UpdateResult updateFirst(Query query, Update update, Class> entityClass
@Override
public UpdateResult updateMulti(Query query, Update update, Class> entityClass) {
- return doUpdate(operations.determineCollectionName(entityClass), query, update, entityClass, false, true);
+ return doUpdate(getCollectionName(entityClass), query, update, entityClass, false, true);
}
@Override
@@ -1692,7 +1692,7 @@ public DeleteResult remove(Object object) {
Assert.notNull(object, "Object must not be null!");
- return remove(object, operations.determineCollectionName(object.getClass()));
+ return remove(object, getCollectionName(object.getClass()));
}
@Override
@@ -1713,7 +1713,7 @@ public DeleteResult remove(Query query, String collectionName) {
@Override
public DeleteResult remove(Query query, Class> entityClass) {
- return remove(query, entityClass, operations.determineCollectionName(entityClass));
+ return remove(query, entityClass, getCollectionName(entityClass));
}
@Override
@@ -1785,7 +1785,7 @@ protected DeleteResult doRemove(final String collectionName, final Query que
@Override
public List findAll(Class entityClass) {
- return findAll(entityClass, operations.determineCollectionName(entityClass));
+ return findAll(entityClass, getCollectionName(entityClass));
}
@Override
@@ -1988,7 +1988,7 @@ public GroupByResults group(@Nullable Criteria criteria, String inputColl
*/
@Override
public AggregationResults aggregate(TypedAggregation> aggregation, Class outputType) {
- return aggregate(aggregation, operations.determineCollectionName(aggregation.getInputType()), outputType);
+ return aggregate(aggregation, getCollectionName(aggregation.getInputType()), outputType);
}
/* (non-Javadoc)
@@ -2011,7 +2011,7 @@ public AggregationResults aggregate(TypedAggregation> aggregation, Stri
@Override
public AggregationResults aggregate(Aggregation aggregation, Class> inputType, Class outputType) {
- return aggregate(aggregation, operations.determineCollectionName(inputType), outputType,
+ return aggregate(aggregation, getCollectionName(inputType), outputType,
new TypeBasedAggregationOperationContext(inputType, mappingContext, queryMapper));
}
@@ -2042,7 +2042,7 @@ public CloseableIterator aggregateStream(TypedAggregation> aggregation,
*/
@Override
public CloseableIterator aggregateStream(TypedAggregation> aggregation, Class outputType) {
- return aggregateStream(aggregation, operations.determineCollectionName(aggregation.getInputType()), outputType);
+ return aggregateStream(aggregation, getCollectionName(aggregation.getInputType()), outputType);
}
/* (non-Javadoc)
@@ -2051,7 +2051,7 @@ public CloseableIterator aggregateStream(TypedAggregation> aggregation,
@Override
public CloseableIterator aggregateStream(Aggregation aggregation, Class> inputType, Class outputType) {
- return aggregateStream(aggregation, operations.determineCollectionName(inputType), outputType,
+ return aggregateStream(aggregation, getCollectionName(inputType), outputType,
new TypeBasedAggregationOperationContext(inputType, mappingContext, queryMapper));
}
@@ -2077,7 +2077,7 @@ public List findAllAndRemove(Query query, String collectionName) {
*/
@Override
public List findAllAndRemove(Query query, Class entityClass) {
- return findAllAndRemove(query, entityClass, operations.determineCollectionName(entityClass));
+ return findAllAndRemove(query, entityClass, getCollectionName(entityClass));
}
/* (non-Javadoc)