Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested mapping in source and destination #87

Open
sanket-jayasval opened this issue Sep 19, 2019 · 0 comments
Open

Nested mapping in source and destination #87

sanket-jayasval opened this issue Sep 19, 2019 · 0 comments

Comments

@sanket-jayasval
Copy link

sanket-jayasval commented Sep 19, 2019

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant