5

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!!

naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
satellite satellite
  • 893
  • 2
  • 10
  • 27

1 Answers1

6

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

naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
Brijesh Soni
  • 567
  • 1
  • 4
  • 14