Skip to content

[100%] Phase 1: Extract Mapper interface and add config option #4184

@evanchooly

Description

@evanchooly

Parent: #4179

Goal

Make Mapper an interface (@MorphiaInternal), rename current implementation to ReflectiveMapper, add mapper() config to MorphiaConfig.

Details

See Phase 1 in planning doc

Tasks

  • Create MapperType enum (LEGACY, CRITTER)
  • Add mapper() to MorphiaConfig interface with default LEGACY
  • Add mapper field to ManualMorphiaConfig
  • Convert Mapper class to interface
  • Create AbstractMapper with shared logic (registration, discriminator, listeners, config)
  • Create ReflectiveMapper extends AbstractMapper (current implementation)
  • Update MorphiaDatastore to use factory method for mapper creation
  • Add Sofia error message for invalid config
  • Verify all existing tests pass unchanged

Constraint

Any changes to the Mapper interface contract require explicit review.

Progress Tracking

phase_percentage = (completed_tasks / 9) * 100, rounded to nearest integer
gh issue edit 4184 --repo MorphiaOrg/morphia --title "[XX%] Phase 1: Extract Mapper interface and add config option"

parent_percentage = (total_completed_tasks_across_all_phases / 53) * 100, rounded to nearest integer
gh issue edit 4179 --repo MorphiaOrg/morphia --title "[XX%] Integrate critter-core into morphia-core"

When all tasks are complete (100%), close this issue and check its box in #4179.

Metadata

Metadata

Assignees

No one assigned

    Labels

    critterCritter bytecode generation integrationenhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions