Skip to content

Maps should not be keyed by objects #105

Description

@andrew-menard

18:37:06.382 [main] WARN d.m.m.validation.MappingValidator - MapKeyTypeConstraint complained about Maps cannot be keyed by Object (Map<Object,?>); Use a parametrized type that is supported (Map<String/Enum/Long/ObjectId/..., ?>)

Sadly, the error message doesn't tell you what map it is whining about, but there appear to be multiple of them (or one that gets scanned multiple times). But in general, any time you have a map indexed by an object, what you actually want is to have the map indexed by the object's id or name instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions