Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 28, 2015
  1. @olivergierke @christophstrobl

    DATAMONGO-1261 - Updated changelog.

    olivergierke authored christophstrobl committed
Commits on Jul 27, 2015
  1. @christophstrobl @olivergierke

    DATAMONGO-1254 - Grouping after projection in aggregation now uses co…

    christophstrobl authored olivergierke committed
    …rrect aliased field name.
    
    We now push the aliased field name down the aggregation pipeline for projections including operations. This allows to reference them in a later stage. Prior to this change the field reference was potentially resolved to the target field of the operation which did not result in an error but lead to false results.
    
    Original pull request: #311.
  2. @christophstrobl @olivergierke

    DATAMONGO-1260 - Prevent accidental authentication misconfiguration o…

    christophstrobl authored olivergierke committed
    …n SimpleMongoDbFactory.
    
    We now reject configuration using MongoClient along with UserCredentials in SimpleMongoDbFactory. This move favors the native authentication mechanism provided via MongoCredential.
    
    <mongo:mongo-client id="mongo-client-with-credentials" credentials="jon:warg@snow?uri.authMechanism=PLAIN" />
    
    Original pull request: #309.
  3. @olivergierke

    DATAMONGO-1257 - We now hint to credential quoting from the XSD.

    olivergierke authored
    The namespace XSD now mentions the capability of quoting more complex credentials in case they validly contain a comma.
Commits on Jul 24, 2015
  1. @olivergierke

    DATAMONGO-1257 - Polishing.

    olivergierke authored
    Made internal helper methods in MongoCredentialPropertyEditor static where possible.
    
    Original pull request: #310.
  2. @christophstrobl @olivergierke

    DATAMONGO-1257 - <mongo:mongo-client /> element now supports username…

    christophstrobl authored olivergierke committed
    …s with a comma.
    
    We now allow grouping credentials by enclosing them in single quotes like this:
    
    credentials='CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry?uri.authMechanism=MONGODB-X509'
    
    We also changed the required argument checks to be more authentication mechanism specific which means the pattern is now username[:password@database][?options].
    
    Original pull request: #310.
Commits on Jul 8, 2015
  1. @olivergierke

    DATAMONGO-1244 - Polishing.

    olivergierke authored
    Minor reformattings and extracted a method to improve digestability.
    
    Original pull request: #306.
  2. @thomasdarimont @olivergierke

    DATAMONGO-1244 - Improved handling of expression parameters in String…

    thomasdarimont authored olivergierke committed
    …BasedMongoQuery.
    
    Replaced regex based parsing of dynamic expression based parameters with custom parsing to make sure we also support complex nested expression objects.
    Previously we only supported simple named or positional expressions. Since MongoDBs JSON based query language uses deeply nested objects to express queries, we needed to improve the handling here.
    
    Manual parsing is tedious and more verbose than regex based parsing but it gives us more control over the whole parsing process.
    
    We also dynamically adjust  the quoting so that we only output quoted parameters if necessary.
    
    This enables to express complex filtering queries the use Spring Security constructors like:
    ```
    @Query("{id: ?#{ hasRole('ROLE_ADMIN') ? {$exists:true} : principal.id}}")
    List<User> findAllForCurrentUserById();
    ```
    
    Original pull request: #306.
Commits on Jul 7, 2015
  1. @christophstrobl @olivergierke

    DATAMONGO-1251 - Fixed potential NullPointerException in UpdateMapper.

    christophstrobl authored olivergierke committed
    We now explicitly handle the possibility of the source object a type hint needs to be calculated for being null.
Commits on Jul 4, 2015
  1. @olivergierke
  2. @olivergierke

    DATAMONGO-1250 - Fixed accidental duplicate invocation of value conve…

    olivergierke authored
    …rsion in UpdateMapper.
    
    UpdateMapper.getMappedObjectForField(…) invokes the very same method of the super class but handed in an already mapped value so that value conversion was invoked twice.
    
    This was especially problematic in cases a dedicated converter had been registered for an object that is already a Mongo-storable one (e.g. an enum-to-string converter and back) without indicating which of the tow converter is the reading or the writing one. This basically caused the source value converted back and forth during the update mapping creating the impression the value wasn't converted at all.
    
    This is now fixed by removing the superfluous mapping.
Commits on Jul 1, 2015
  1. @olivergierke @christophstrobl

    DATAMONGO-1246 - Updated changelog.

    olivergierke authored christophstrobl committed
  2. @olivergierke @christophstrobl

    DATAMONGO-1247 - Updated changelog.

    olivergierke authored christophstrobl committed
Commits on Jun 30, 2015
  1. @olivergierke @christophstrobl

    DATAMONGO-1248 - Updated changelog.

    olivergierke authored christophstrobl committed
  2. @olivergierke

    DATAMONGO-1236 - Polishing.

    olivergierke authored
    Removed the creation of a BasicMongoPersistentEntity in favor of always handing ClassTypeInformation.OBJECT into the converter in case not entity can be found.
    
    This makes sure type information is written for updates on properties of type Object (which essentially leads to no PersistentEntity being available).
    
    Original pull request: #301.
  3. @christophstrobl @olivergierke

    DATAMONGO-1236 - Update now include type hint correctly.

    christophstrobl authored olivergierke committed
    We now use property type information when mapping fields affected by an update in case we do not have proper entity information within the context. This allows more precise type resolution required for determining the need to write type hints for a given property.
    
    Original pull request: #301.
Commits on Jun 24, 2015
  1. @christophstrobl @olivergierke

    DATAMONGO-1125 - Improve exception message for index creation errors.

    christophstrobl authored olivergierke committed
    We now use MongoExceptionTranslator to potentially convert exceptions during index creation into Springs DataAccessException hierarchy. In case we encounter an error code indicating DataIntegrityViolation we try to fetch existing index data and append it to the exceptions message.
    
    Original pull request: #302.
Commits on Jun 22, 2015
  1. @christophstrobl @olivergierke

    DATAMONGO-1232 - IngoreCase in criteria now escapes query.

    christophstrobl authored olivergierke committed
    We now quote the original criteria before actually wrapping it inside of an regular expression for case insensitive search. This happens not only to case insensitive is, startsWith, endsWith criteria but also to those using like. In that case we quote the part between leading and trailing wildcard if required.
    
    Original pull request: #301.
  2. @christophstrobl @olivergierke

    DATAMONGO-1166 - ReadPreference is now be used for aggregations.

    christophstrobl authored olivergierke committed
    We now use MongoTemplate.readPreference(…) when executing commands such as geoNear(…) and aggregate(…).
    
    Original pull request: #303.
Commits on Jun 19, 2015
  1. @christophstrobl @olivergierke

    DATAMONGO-1157 - Throw meaningful exception when @DbRef is used with …

    christophstrobl authored olivergierke committed
    …unsupported types.
    
    We now eagerly check DBRef properties for invalid definitions such as final class or array. In that case we throw a MappingException when verify is called.
  2. @thomasdarimont @olivergierke

    DATAMONGO-1242 - Update MongoDB Java driver to 3.0.2 in mongo3 profile.

    thomasdarimont authored olivergierke committed
    Update mongo driver.
    
    Original pull request: #304.
Commits on Jun 5, 2015
  1. @olivergierke

    DATAMONGO-1229 - Fixed application of ignore case flag on nested prop…

    olivergierke authored
    …erties.
    
    Previously we tried to apply the ignore case settings found in the PartTree to the root PropertyPath we handle in MongoQueryCreator.create(). This is now changed to work on the leaf property of the PropertyPath.
  2. @eddumelendez @olivergierke

    DATAMONGO-1234 - Fix typos in JavaDoc.

    eddumelendez authored olivergierke committed
Commits on Jun 2, 2015
  1. @olivergierke
  2. @spring-buildmaster
  3. @spring-buildmaster
  4. @olivergierke
  5. @olivergierke
Commits on Jun 1, 2015
  1. @olivergierke

    DATAMONGO-990 - Polishing.

    olivergierke authored
    Removed EvaluationExpressionContext from all AbstractMongoQuery implementations that don't actually need it and from AbstractMongoQuery itself, too. Cleaned up test cases after that.
    
    Moved SpEL related tests into AbstractPersonRepositoryIntegrationTests to make sure they're executed for all sub-types. JavaDoc and assertion polishes.
    
    Original pull request: #285.
  2. @thomasdarimont @olivergierke

    DATAMONGO-990 - Add support for SpEL expressions in @Query.

    thomasdarimont authored olivergierke committed
    Ported and adapted support for SpEL expressions @Query annotations from Spring Data JPA. StringBasedMongoQuery can now evaluate SpEL fragments in queries with the help of the given EvaluationContextProvider. Introduced EvaluationContextProvider to AbstractMongoQuery. Exposed access to actual parameter values in MongoParameterAccessor.
    
    Original pull request: #285.
  3. @olivergierke

    DATAMONGO-1210 - Polishing.

    olivergierke authored
    Moved getTypeHint(…) method to Field class.
    
    Original pull request: #292.
  4. @christophstrobl @olivergierke

    DATAMONGO-1210 - Fixed type hints for usage with findAndModify(…).

    christophstrobl authored olivergierke committed
    We now inspect the actual field type during update mapping and provide a type hint accordingly. Simple, non interface and non abstract types will no longer be decorated with the _class attribute. We now honor positional parameters when trying to map paths to properties. This allows more decent type mapping since we have now access to the meta model which allows us to check if presence of type hint (aka _class) is required.
    
    We now add a special type hint indicating nested types to the converter. This allows more fine grained removal of _class property without the need to break the contract of MongoWriter.convertToMongoType(…).
    
    Original pull request: #292.
  5. @stefanganzer @olivergierke

    DATAMONGO-1210 - Add breaking test case for findAndModify/addToSet/each.

    stefanganzer authored olivergierke committed
    The problem stems from the inconsistent handling of type hints such as MongoTemplate.save(…) does not add a type hint, but findAndModify(…) does. The same values are then treated differently by MongoDB, depending on whether they have a type hint or not. To verify this behavior, you can manually add the (superfluous) type hint to the saved object - findAndModify will then work as expected.
    
    Additional tests demonstrate that findAndModify(…) removes type hints from complex documents in collections that are either nested in another collection or in a document, or doesn't add them in the first place.
    
    Original pull requests: #290, #291.
    Related pull request: #292.
    CLA: 119820150506013701 (Stefan Ganzer)
  6. @christophstrobl @olivergierke

    DATAMONGO-1134 - Add support for $geoIntersects.

    christophstrobl authored olivergierke committed
    We now support $geoIntersects via Criteria.intersects(…) using GeoJSON types.
    
    Original pull request: #295.
  7. @christophstrobl @olivergierke

    DATAMONGO-1216 - Skip authentication via AuthDB for MongoClient.

    christophstrobl authored olivergierke committed
    We now skip authentication via an explicit AuthDB when requesting a DB via a MongoClient instance.
    
    Related ticket: DATACMNS-1218
    Original pull request: #296.
Something went wrong with that request. Please try again.