publicissapient-france / selma

Selma Java bean mapping that compiles
http://selma-java.org
Apache License 2.0
212 stars 38 forks source link

@Mapper igonre filed under a collcetion of objects #183

Open YoussefArfaoui opened 6 years ago

YoussefArfaoui commented 6 years ago

Hello,

I have a parentNode object that contains collection of childNode objects . Each childNode contains two attributes (attribute1, attribute2) I have created a ParentNodeMapper and I want to ignore attribute2 from childNode objects. I tried the withIgnoreFields = {"com.test.entities.ParentNode .childs.attribute2","com.test.beans.ParentNode .childs.attribute2"}, but it didn't work. If there any why to ignore it without passing by custom mapper?

Thanks

slemesle commented 6 years ago

Hi,

sorry for delay, you can ignore the attribute2 based on its name, or with the name of the class holding it : "attribute2", "Class.attribute2" or "xx.yyy.zzz.Class.attribute2"

Selma does not ignore fields based on a complete bean path.