Compare commits
20 Commits
2.1.17.REL
...
2.1.19.REL
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a567cb1f7b | ||
|
|
b42081f05b | ||
|
|
9380cfea08 | ||
|
|
3466281a8b | ||
|
|
26e8b3a8ec | ||
|
|
b0814d334f | ||
|
|
33624fcc6a | ||
|
|
7e63897b87 | ||
|
|
2c446f5693 | ||
|
|
e05dffec18 | ||
|
|
47dd74b8d6 | ||
|
|
c7e4673e29 | ||
|
|
9d694dbdd5 | ||
|
|
74179a9af9 | ||
|
|
c1c5e3bdbb | ||
|
|
24978577cc | ||
|
|
c43ae822be | ||
|
|
881a69864f | ||
|
|
dc054a793f | ||
|
|
f048fb6800 |
35
.travis.yml
35
.travis.yml
@@ -1,35 +0,0 @@
|
||||
language: java
|
||||
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
before_install:
|
||||
- mkdir -p downloads
|
||||
- mkdir -p var/db var/log
|
||||
- if [[ ! -d downloads/mongodb-linux-x86_64-ubuntu1604-${MONGO_VERSION} ]] ; then cd downloads && wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-${MONGO_VERSION}.tgz && tar xzf mongodb-linux-x86_64-ubuntu1604-${MONGO_VERSION}.tgz && cd ..; fi
|
||||
- downloads/mongodb-linux-x86_64-ubuntu1604-${MONGO_VERSION}/bin/mongod --version
|
||||
- downloads/mongodb-linux-x86_64-ubuntu1604-${MONGO_VERSION}/bin/mongod --dbpath var/db --replSet rs0 --fork --logpath var/log/mongod.log
|
||||
- sleep 10
|
||||
- |-
|
||||
downloads/mongodb-linux-x86_64-ubuntu1604-${MONGO_VERSION}/bin/mongo --eval "rs.initiate({_id: 'rs0', members:[{_id: 0, host: '127.0.0.1:27017'}]});"
|
||||
sleep 15
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- PROFILE=ci
|
||||
global:
|
||||
- MONGO_VERSION=4.0.0
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- oracle-java8-installer
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
- downloads
|
||||
|
||||
script: "mvn clean dependency:list test -P${PROFILE} -Dsort"
|
||||
6
pom.xml
6
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Spring Data MongoDB</name>
|
||||
@@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-parent</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
@@ -27,7 +27,7 @@
|
||||
<properties>
|
||||
<project.type>multi</project.type>
|
||||
<dist.id>spring-data-mongodb</dist.id>
|
||||
<springdata.commons>2.1.17.RELEASE</springdata.commons>
|
||||
<springdata.commons>2.1.19.RELEASE</springdata.commons>
|
||||
<mongo>3.8.2</mongo>
|
||||
<mongo.reactivestreams>1.9.2</mongo.reactivestreams>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<!-- reactive -->
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.1.17.RELEASE</version>
|
||||
<version>2.1.19.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ public abstract class MongoDbFactorySupport<C> implements MongoDbFactory {
|
||||
factory.addAdvice(new SessionAwareMethodInterceptor<>(session, target, ClientSession.class, MongoDatabase.class,
|
||||
this::proxyDatabase, MongoCollection.class, this::proxyCollection));
|
||||
|
||||
return targetType.cast(factory.getProxy());
|
||||
return targetType.cast(factory.getProxy(target.getClass().getClassLoader()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1191,7 +1191,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware,
|
||||
|
||||
/**
|
||||
* Prepare the collection before any processing is done using it. This allows a convenient way to apply settings like
|
||||
* slaveOk() etc. Can be overridden in sub-classes.
|
||||
* withCodecRegistry() etc. Can be overridden in sub-classes.
|
||||
*
|
||||
* @param collection
|
||||
*/
|
||||
|
||||
@@ -2458,7 +2458,7 @@ public class ReactiveMongoTemplate implements ReactiveMongoOperations, Applicati
|
||||
|
||||
/**
|
||||
* Prepare the collection before any processing is done using it. This allows a convenient way to apply settings like
|
||||
* slaveOk() etc. Can be overridden in sub-classes.
|
||||
* withCodecRegistry() etc. Can be overridden in sub-classes.
|
||||
*
|
||||
* @param collection
|
||||
*/
|
||||
|
||||
@@ -233,7 +233,7 @@ public class SimpleReactiveMongoDatabaseFactory implements DisposableBean, React
|
||||
factory.addAdvice(new SessionAwareMethodInterceptor<>(session, target, ClientSession.class, MongoDatabase.class,
|
||||
this::proxyDatabase, MongoCollection.class, this::proxyCollection));
|
||||
|
||||
return targetType.cast(factory.getProxy());
|
||||
return targetType.cast(factory.getProxy(target.getClass().getClassLoader()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.data.mongodb.core.aggregation.ExposedFields.FieldRefe
|
||||
* {@link AggregationOperationContext} implementation prefixing non-command keys on root level with the given prefix.
|
||||
* Useful when mapping fields to domain specific types while having to prefix keys for query purpose.
|
||||
* <p />
|
||||
* Fields to be excluded from prefixing my be added to a {@literal blacklist}.
|
||||
* Fields to be excluded from prefixing my be added to a {@literal denylist}.
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
@@ -40,18 +40,18 @@ public class PrefixingDelegatingAggregationOperationContext implements Aggregati
|
||||
|
||||
private final AggregationOperationContext delegate;
|
||||
private final String prefix;
|
||||
private final Set<String> blacklist;
|
||||
private final Set<String> denylist;
|
||||
|
||||
public PrefixingDelegatingAggregationOperationContext(AggregationOperationContext delegate, String prefix) {
|
||||
this(delegate, prefix, Collections.emptySet());
|
||||
}
|
||||
|
||||
public PrefixingDelegatingAggregationOperationContext(AggregationOperationContext delegate, String prefix,
|
||||
Collection<String> blacklist) {
|
||||
Collection<String> denylist) {
|
||||
|
||||
this.delegate = delegate;
|
||||
this.prefix = prefix;
|
||||
this.blacklist = new HashSet<>(blacklist);
|
||||
this.denylist = new HashSet<>(denylist);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -102,7 +102,7 @@ public class PrefixingDelegatingAggregationOperationContext implements Aggregati
|
||||
}
|
||||
|
||||
private String prefixKey(String key) {
|
||||
return (key.startsWith("$") || isBlacklisted(key)) ? key : (prefix + "." + key);
|
||||
return (key.startsWith("$") || isDenied(key)) ? key : (prefix + "." + key);
|
||||
}
|
||||
|
||||
private Object prefixCollection(Collection<Object> sourceCollection) {
|
||||
@@ -120,9 +120,9 @@ public class PrefixingDelegatingAggregationOperationContext implements Aggregati
|
||||
return prefixed;
|
||||
}
|
||||
|
||||
private boolean isBlacklisted(String key) {
|
||||
private boolean isDenied(String key) {
|
||||
|
||||
if (blacklist.contains(key)) {
|
||||
if (denylist.contains(key)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -130,8 +130,8 @@ public class PrefixingDelegatingAggregationOperationContext implements Aggregati
|
||||
return false;
|
||||
}
|
||||
|
||||
for (String blacklisted : blacklist) {
|
||||
if (key.startsWith(blacklisted + ".")) {
|
||||
for (String denied : denylist) {
|
||||
if (key.startsWith(denied + ".")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public class DefaultDbRefResolver implements DbRefResolver {
|
||||
proxyFactory.addInterface(propertyType);
|
||||
proxyFactory.addAdvice(interceptor);
|
||||
|
||||
return handler.populateId(property, dbref, proxyFactory.getProxy());
|
||||
return handler.populateId(property, dbref, proxyFactory.getProxy(LazyLoadingProxy.class.getClassLoader()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ import com.mongodb.client.model.changestream.FullDocument;
|
||||
*/
|
||||
class ChangeStreamTask extends CursorReadingTask<ChangeStreamDocument<Document>, Object> {
|
||||
|
||||
private final Set<String> blacklist = new HashSet<>(
|
||||
private final Set<String> denylist = new HashSet<>(
|
||||
Arrays.asList("operationType", "fullDocument", "documentKey", "updateDescription", "ns"));
|
||||
|
||||
private final QueryMapper queryMapper;
|
||||
@@ -165,7 +165,7 @@ class ChangeStreamTask extends CursorReadingTask<ChangeStreamDocument<Document>,
|
||||
template.getConverter().getMappingContext(), queryMapper)
|
||||
: Aggregation.DEFAULT_CONTEXT;
|
||||
|
||||
return agg.toPipeline(new PrefixingDelegatingAggregationOperationContext(context, "fullDocument", blacklist));
|
||||
return agg.toPipeline(new PrefixingDelegatingAggregationOperationContext(context, "fullDocument", denylist));
|
||||
}
|
||||
|
||||
if (filter instanceof List) {
|
||||
|
||||
@@ -284,9 +284,21 @@ public class Meta {
|
||||
*/
|
||||
EXHAUST,
|
||||
|
||||
/** Allows querying of a replica slave. */
|
||||
/**
|
||||
* Allows querying of a replica.
|
||||
*
|
||||
* @deprecated since 3.0.2, use {@link #SECONDARY_READS} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
SLAVE_OK,
|
||||
|
||||
/**
|
||||
* Allows querying of a replica.
|
||||
*
|
||||
* @since 3.0.2
|
||||
*/
|
||||
SECONDARY_READS,
|
||||
|
||||
/**
|
||||
* Sets the cursor to return partial data from a query against a sharded cluster in which some shards do not respond
|
||||
* rather than throwing an error.
|
||||
|
||||
@@ -418,18 +418,33 @@ public class Query {
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows querying of a replica slave.
|
||||
* Allows querying of a replica.
|
||||
*
|
||||
* @return this.
|
||||
* @see org.springframework.data.mongodb.core.query.Meta.CursorOption#SLAVE_OK
|
||||
* @since 1.10
|
||||
* @deprecated since 3.0.2, use {@link #allowSecondaryReads()}.
|
||||
*/
|
||||
@Deprecated
|
||||
public Query slaveOk() {
|
||||
|
||||
meta.addFlag(Meta.CursorOption.SLAVE_OK);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows querying of a replica.
|
||||
*
|
||||
* @return this.
|
||||
* @see org.springframework.data.mongodb.core.query.Meta.CursorOption#SECONDARY_READS
|
||||
* @since 3.0.2
|
||||
*/
|
||||
public Query allowSecondaryReads() {
|
||||
|
||||
meta.addFlag(Meta.CursorOption.SECONDARY_READS);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return this.
|
||||
* @see org.springframework.data.mongodb.core.query.Meta.CursorOption#PARTIAL
|
||||
|
||||
@@ -56,6 +56,6 @@ class QueryUtils {
|
||||
return combinedSort;
|
||||
});
|
||||
|
||||
return (Query) factory.getProxy();
|
||||
return (Query) factory.getProxy(query.getClass().getClassLoader());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ import org.springframework.util.Assert;
|
||||
* @author Christoph Strobl
|
||||
* @author Thomas Darimont
|
||||
* @author Mark Paluch
|
||||
* @author Mehran Behnam
|
||||
*/
|
||||
public class SimpleMongoRepository<T, ID> implements MongoRepository<T, ID> {
|
||||
|
||||
@@ -94,7 +95,7 @@ public class SimpleMongoRepository<T, ID> implements MongoRepository<T, ID> {
|
||||
Assert.notNull(entities, "The given Iterable of entities not be null!");
|
||||
|
||||
Streamable<S> source = Streamable.of(entities);
|
||||
boolean allNew = source.stream().allMatch(it -> entityInformation.isNew(it));
|
||||
boolean allNew = source.stream().allMatch(entityInformation::isNew);
|
||||
|
||||
if (allNew) {
|
||||
|
||||
@@ -201,6 +202,8 @@ public class SimpleMongoRepository<T, ID> implements MongoRepository<T, ID> {
|
||||
@Override
|
||||
public Iterable<T> findAllById(Iterable<ID> ids) {
|
||||
|
||||
Assert.notNull(ids, "The given Ids of entities not be null!");
|
||||
|
||||
return findAll(new Query(new Criteria(entityInformation.getIdAttribute())
|
||||
.in(Streamable.of(ids).stream().collect(StreamUtils.toUnmodifiableList()))));
|
||||
}
|
||||
@@ -214,7 +217,7 @@ public class SimpleMongoRepository<T, ID> implements MongoRepository<T, ID> {
|
||||
|
||||
Assert.notNull(pageable, "Pageable must not be null!");
|
||||
|
||||
Long count = count();
|
||||
long count = count();
|
||||
List<T> list = findAll(new Query().with(pageable));
|
||||
|
||||
return new PageImpl<T>(list, pageable, count);
|
||||
|
||||
@@ -434,7 +434,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -432,7 +432,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -531,7 +531,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -531,7 +531,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -447,7 +447,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -462,7 +462,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -480,7 +480,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -498,7 +498,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -531,7 +531,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -537,7 +537,7 @@ This controls whether or not to fsync. The 'fsync' option to the getlasterror c
|
||||
<xsd:attribute name="slave-ok" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
This controls if the driver is allowed to read from secondaries or slaves. Defaults to false.
|
||||
This controls if the driver is allowed to read from secondaries or replicas. Defaults to false.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
|
||||
@@ -1219,7 +1219,7 @@ public class MongoTemplateTests {
|
||||
assertThat(p5.getFirstName(), is("Mark"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test // DATAMONGO-2572
|
||||
public void testUsingReadPreference() throws Exception {
|
||||
this.template.execute("readPref", new CollectionCallback<Object>() {
|
||||
public Object doInCollection(MongoCollection<org.bson.Document> collection)
|
||||
@@ -1230,9 +1230,9 @@ public class MongoTemplateTests {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
MongoTemplate slaveTemplate = new MongoTemplate(factory);
|
||||
slaveTemplate.setReadPreference(ReadPreference.secondary());
|
||||
slaveTemplate.execute("readPref", new CollectionCallback<Object>() {
|
||||
MongoTemplate secondaryTemplate = new MongoTemplate(factory);
|
||||
secondaryTemplate.setReadPreference(ReadPreference.secondary());
|
||||
secondaryTemplate.execute("readPref", new CollectionCallback<Object>() {
|
||||
public Object doInCollection(MongoCollection<org.bson.Document> collection)
|
||||
throws MongoException, DataAccessException {
|
||||
assertThat(collection.getReadPreference(), is(ReadPreference.secondary()));
|
||||
|
||||
@@ -210,14 +210,14 @@ public class MongoQueryMethodUnitTests {
|
||||
containsInAnyOrder(org.springframework.data.mongodb.core.query.Meta.CursorOption.NO_TIMEOUT));
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1480
|
||||
@Test // DATAMONGO-1480, DATAMONGO-2572
|
||||
public void createsMongoQueryMethodWithMultipleFlagsCorrectly() throws Exception {
|
||||
|
||||
MongoQueryMethod method = queryMethod(PersonRepository.class, "metaWithMultipleFlags");
|
||||
|
||||
assertThat(method.hasQueryMetaAttributes(), is(true));
|
||||
assertThat(method.getQueryMetaAttributes().getFlags(),
|
||||
containsInAnyOrder(org.springframework.data.mongodb.core.query.Meta.CursorOption.NO_TIMEOUT, org.springframework.data.mongodb.core.query.Meta.CursorOption.SLAVE_OK));
|
||||
containsInAnyOrder(org.springframework.data.mongodb.core.query.Meta.CursorOption.NO_TIMEOUT, org.springframework.data.mongodb.core.query.Meta.CursorOption.SECONDARY_READS));
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1266
|
||||
@@ -275,7 +275,8 @@ public class MongoQueryMethodUnitTests {
|
||||
@Meta(flags = { org.springframework.data.mongodb.core.query.Meta.CursorOption.NO_TIMEOUT })
|
||||
List<User> metaWithNoCursorTimeout();
|
||||
|
||||
@Meta(flags = { org.springframework.data.mongodb.core.query.Meta.CursorOption.NO_TIMEOUT, org.springframework.data.mongodb.core.query.Meta.CursorOption.SLAVE_OK })
|
||||
@Meta(flags = { org.springframework.data.mongodb.core.query.Meta.CursorOption.NO_TIMEOUT,
|
||||
org.springframework.data.mongodb.core.query.Meta.CursorOption.SECONDARY_READS })
|
||||
List<User> metaWithMultipleFlags();
|
||||
|
||||
// DATAMONGO-1266
|
||||
|
||||
@@ -1,6 +1,95 @@
|
||||
Spring Data MongoDB Changelog
|
||||
=============================
|
||||
|
||||
Changes in version 2.1.19.RELEASE (2020-07-22)
|
||||
----------------------------------------------
|
||||
* DATAMONGO-2572 - Remove usage of Oppressive Language.
|
||||
* DATAMONGO-2570 - Avoiding unintentional unboxing.
|
||||
* DATAMONGO-2566 - Release 2.1.19 (Lovelace SR19).
|
||||
|
||||
|
||||
Changes in version 3.1.0-M1 (2020-06-25)
|
||||
----------------------------------------
|
||||
* DATAMONGO-2576 - Upgrade to Hibernate Validator 5.4.3.
|
||||
* DATAMONGO-2574 - GridFSOperations should not override content type.
|
||||
* DATAMONGO-2572 - Remove usage of Oppressive Language.
|
||||
* DATAMONGO-2570 - Avoiding unintentional unboxing.
|
||||
* DATAMONGO-2565 - MongoPersistentEntity.getCollation(...) evaluates document expression instead of collation expression.
|
||||
* DATAMONGO-2564 - Use standard Spring code of conduct.
|
||||
* DATAMONGO-2562 - CoroutineCrudRepository findAllBy throwing IncorrectResultSizeDataAccessException when more than 1 result.
|
||||
* DATAMONGO-2560 - Upgrade MongoDB drivers to 4.0.4.
|
||||
* DATAMONGO-2558 - Add integration test for RxJava 3 repositories.
|
||||
* DATAMONGO-2556 - Support countAll() in MongoOperations.
|
||||
* DATAMONGO-2553 - Reference documentation contains links to removed sections.
|
||||
* DATAMONGO-2547 - java.lang.IllegalArgumentException: com.mongodb.client.MongoDatabase referenced from a method is not visible from class loader.
|
||||
* DATAMONGO-2545 - Backwards incompatibilities on @Query.
|
||||
* DATAMONGO-2544 - Release 3.1 M1 (2020.0.0).
|
||||
* DATAMONGO-2542 - Don't attempt to map query operator keywords to properties.
|
||||
* DATAMONGO-2538 - Delombok source files.
|
||||
* DATAMONGO-2285 - BulkOperations.execute throws DuplicateKeyException.
|
||||
* DATAMONGO-1569 - Allow partial filter expression usage along with the *...Indexed annotations.
|
||||
|
||||
|
||||
Changes in version 3.0.1.RELEASE (2020-06-10)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2565 - MongoPersistentEntity.getCollation(...) evaluates document expression instead of collation expression.
|
||||
* DATAMONGO-2562 - CoroutineCrudRepository findAllBy throwing IncorrectResultSizeDataAccessException when more than 1 result.
|
||||
* DATAMONGO-2560 - Upgrade MongoDB drivers to 4.0.4.
|
||||
* DATAMONGO-2553 - Reference documentation contains links to removed sections.
|
||||
* DATAMONGO-2547 - java.lang.IllegalArgumentException: com.mongodb.client.MongoDatabase referenced from a method is not visible from class loader.
|
||||
* DATAMONGO-2545 - Backwards incompatibilities on @Query.
|
||||
* DATAMONGO-2543 - Release 3.0.1 (Neumann SR1).
|
||||
* DATAMONGO-2542 - Don't attempt to map query operator keywords to properties.
|
||||
|
||||
|
||||
Changes in version 2.2.8.RELEASE (2020-06-10)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2565 - MongoPersistentEntity.getCollation(...) evaluates document expression instead of collation expression.
|
||||
* DATAMONGO-2547 - java.lang.IllegalArgumentException: com.mongodb.client.MongoDatabase referenced from a method is not visible from class loader.
|
||||
* DATAMONGO-2545 - Backwards incompatibilities on @Query.
|
||||
* DATAMONGO-2542 - Don't attempt to map query operator keywords to properties.
|
||||
* DATAMONGO-2535 - Remove Travis CI.
|
||||
* DATAMONGO-2533 - Release 2.2.8 (Moore SR8).
|
||||
* DATAMONGO-2509 - Polish documentation for 3.0 release.
|
||||
|
||||
|
||||
Changes in version 2.1.18.RELEASE (2020-06-10)
|
||||
----------------------------------------------
|
||||
* DATAMONGO-2547 - java.lang.IllegalArgumentException: com.mongodb.client.MongoDatabase referenced from a method is not visible from class loader.
|
||||
* DATAMONGO-2535 - Remove Travis CI.
|
||||
* DATAMONGO-2532 - Release 2.1.18 (Lovelace SR18).
|
||||
|
||||
|
||||
Changes in version 3.0.0.RC2 (2020-04-28)
|
||||
-----------------------------------------
|
||||
* DATAMONGO-2531 - Fix MongoClientSettings UUID configuration hook in MongoConfigurationSupport.
|
||||
* DATAMONGO-2529 - EntityReader called with null argument.
|
||||
* DATAMONGO-2523 - ParameterBindingJsonReader skips too many chars.
|
||||
* DATAMONGO-2517 - Text search fails on entity with second constructor.
|
||||
* DATAMONGO-2516 - Assert compatibility with MongoDB 4.4-rc0.
|
||||
* DATAMONGO-2513 - ComparisonOperators.Eq#equalToValue doesn't work well with Lists.
|
||||
* DATAMONGO-2510 - Use JDK 14 for Java.NEXT CI testing.
|
||||
* DATAMONGO-2508 - Upgrade to MongoDB 4.0.2 Drivers.
|
||||
* DATAMONGO-2507 - Add default method accepting CriteriaDefinition on ReactiveFindOperation.DistinctWithQuery.
|
||||
* DATAMONGO-2506 - StringBasedAggregation should raise meaningful error when unsupported return type requested.
|
||||
* DATAMONGO-2505 - Deferred Database retrieval from ReactiveMongoDatabaseFactory.
|
||||
* DATAMONGO-2504 - TextCriteria Hashcode and equals.
|
||||
* DATAMONGO-2503 - Release 3.0 RC2 (Neumann).
|
||||
* DATAMONGO-2502 - Regression in Update property mapping.
|
||||
|
||||
|
||||
Changes in version 2.2.7.RELEASE (2020-04-28)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2529 - EntityReader called with null argument.
|
||||
* DATAMONGO-2523 - ParameterBindingJsonReader skips too many chars.
|
||||
* DATAMONGO-2517 - Text search fails on entity with second constructor.
|
||||
* DATAMONGO-2513 - ComparisonOperators.Eq#equalToValue doesn't work well with Lists.
|
||||
* DATAMONGO-2506 - StringBasedAggregation should raise meaningful error when unsupported return type requested.
|
||||
* DATAMONGO-2504 - TextCriteria Hashcode and equals.
|
||||
* DATAMONGO-2502 - Regression in Update property mapping.
|
||||
* DATAMONGO-2500 - Release 2.2.7 (Moore SR7).
|
||||
|
||||
|
||||
Changes in version 2.1.17.RELEASE (2020-04-28)
|
||||
----------------------------------------------
|
||||
* DATAMONGO-2529 - EntityReader called with null argument.
|
||||
@@ -2986,4 +3075,11 @@ Repository
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Spring Data MongoDB 2.1.17
|
||||
Spring Data MongoDB 2.1.19 (Lovelace SR19)
|
||||
Copyright (c) [2010-2019] Pivotal Software, Inc.
|
||||
|
||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||
@@ -12,3 +12,5 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user