satellite satellite
satellite satellite

Reputation: 963

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

Upvotes: 5

Views: 4170

Answers (1)

Brijesh Soni
Brijesh Soni

Reputation: 577

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

Upvotes: 6

Related Questions