Skip to content

Nested mapping in source and destination #87

Description

@sanket-jayasval

Hi,

I am new to JMapper, was trying to map two nested objects.

Scenario:

Source {                                    Destination {
    User {                                              Address {
         Address {                                                String city;
               String city;                                      }
         }                                             }
    }
   String city2;
}

Working Fine :


JMapperAPI jmapperApi = new JMapperAPI()
                .add(mappedClass(Source.class)
        .add(attribute("city2").value("${address.city}"))

Not working:


JMapperAPI jmapperApi = new JMapperAPI()
                .add(mappedClass(Source.class)
        .add(attribute("${user.address.city}").value("${address.city}"))

Could you please help , what's wrong here ?

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