Spring Data MongoDB
  1. Spring Data MongoDB
  2. DATAMONGO-63

Converters to support use of a 'typeId' strategy to determine class to marshall/unmarshal from Mongo

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0 M2
    • Fix Version/s: 1.0 M4
    • Component/s: Mapping
    • Labels:
      None

      Description

      Looking into some previous work might be useful. In Spring AMQP there is

      public interface ClassMapper {

      String getClassIdFieldName();

      String fromClass(Class<?> clazz);

      Class<?> toClass(String classId);
      }

      which is used by the JsonMessageConverter to support this pattern. Look at DefaultClassMapper as well.

        Issue Links

          Activity

          Hide
          Oliver Gierke added a comment -

          Fixed and deployed to snapshot repository. Take a look at TypeMapper, DefaultTypeMapper and ConfigurableTypeMapper.

          Show
          Oliver Gierke added a comment - Fixed and deployed to snapshot repository. Take a look at TypeMapper , DefaultTypeMapper and ConfigurableTypeMapper .

            People

            • Assignee:
              Oliver Gierke
              Reporter:
              Mark Pollack
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 3h 37m
                3h 37m