I using Orika mapper to map two beans. i would like to exclude billingSummary.billableItems property while mapping. I am trying below option but it is not working.
Any help?
public class Cart { private String id; private String name; private BillingSummary billingSummary; private String address; //with getter and setter methods } public class BillingSummary { private String billingItem; private String billingItemId; private BillableItems billableItems; ... // with getter setter methods } //FilteredCart is same as Cart. public class FilteredCart { private String id; private String name; private BillingSummary billingSummary; private String address; //with getter and setter methods } @Component public class CartMapper extends ConfigurableMapper { @Override public void configure(MapperFactory mapperFactory) { mapperFactory.classMap(Cart.class,FilteredCart.class).exclude("billingSummary.billableItems").byDefault().register(); } }
billableItemsin the mapping exclude? From your code, I can seebillingItems