404-not-find / orika

Automatically exported from code.google.com/p/orika
2 stars 0 forks source link

Map single field into a List #117

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I have the following use case:

class Address() {
    private String addressName;

    ...getter/setter
}

class AddressDTO {
    private String addressName;

    ...getter/setter
}

class People() {
    private List<Address> addresses;

    ...getter/setter
}

I want to map the AddressDTO.addressName to People.addresses.addressName

is there a simple way like using 

factory.classMap(AddressDTO.class, People.class)
                .field("addressName", "addresses.addressName")

According to the orika guide, we can use

factory.classMap(AddressDTO.class, People.class)
                .field("collection{item}", "addresses{addressName}")

to map a collection case.

Can add a new feature to map a single field to the List?

Original issue reported on code.google.com by liping.huang2008@gmail.com on 29 Jul 2013 at 1:21

GoogleCodeExporter commented 8 years ago
Support has been added to most recent master (1.4.4-SNAPSHOT); please let me 
know how it works for you...

Original comment by matt.deb...@gmail.com on 14 Oct 2013 at 4:18