Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.0.3, 1.1 M2
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Java 6.

      Description

      After upgrading to 1.0.2 storing fails with the stacktrace below:

      It seems like the incorrect property is used when mapping the ID, possibly being confused by a getter 'getId()' that is not referencing the MongoDB Id.

      See example project on Bitbucket for testcase. CarRepositoryTest#findByCarId
      https://bitbucket.org/patrikfr/springmongotest

      org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type mongo.CarId to type java.lang.String
      	at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:475)
      	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175)
      	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:154)
      	at org.springframework.data.mapping.model.BeanWrapper.getPotentiallyConvertedValue(BeanWrapper.java:233)
      	at org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:212)
      	at org.springframework.data.mapping.model.BeanWrapper.getProperty(BeanWrapper.java:183)
      	at org.springframework.data.mongodb.core.MongoTemplate.populateIdIfNecessary(MongoTemplate.java:1375)
      	at org.springframework.data.mongodb.core.MongoTemplate.doSave(MongoTemplate.java:723)
      	at org.springframework.data.mongodb.core.MongoTemplate.save(MongoTemplate.java:708)
      	at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.save(SimpleMongoRepository.java:70)
      

        Attachments

          Activity

            People

            • Assignee:
              olivergierke Oliver Gierke
              Reporter:
              patrikfr Patrik Fredriksson
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: