Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dozer, how to ignore a field with annotation

I'm using dozer to map objects. How can I ignore (exclude) a field using annotations with dozer?

Something like:

    class A
    { 
       @IgnoreField
       public String someField;
    }

    class B
    { 
       public String someField;
    }

    .........................................
    B obj = mapper.map(A_obj, B.class);

Thanks a lot!!

like image 972
satellite satellite Avatar asked Oct 18 '16 20:10

satellite satellite


1 Answers

Use @Mapping("this"). It will help you

like image 64
Brijesh Soni Avatar answered Oct 03 '22 07:10

Brijesh Soni