You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I got is :
[ERROR] /home/benoit/projects/selma-test/src/main/java/com/test/SubElementMapper.java:[17,27] setter for field id from source bean com.test.from.SubSubElement is missing in destination bean com.test.to.AnotherSubElement !
[ERROR] --> Add @Mapper(withIgnoreFields="com.test.from.SubSubElement.id") / @maps(withIgnoreFields="com.test.from.SubSubElement.id") to mapper interface / method or add missing getter or specify corresponding @field to customize field to field mapping
[ERROR] setter for field id from destination bean com.test.to.AnotherSubElement has no getter in source bean com.test.from.SubSubElement !
[ERROR] --> Add @Mapper(withIgnoreFields="com.test.to.AnotherSubElement.id") / @maps(withIgnoreFields="com.test.to.AnotherSubElement.id") to mapper interface / method or add missing setter or specify corresponding @field to customize field to field mapping
But my object are
public class SubSubElement {
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
and
public class AnotherSubElement {
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
Thanks for your help
The text was updated successfully, but these errors were encountered:
This is now fixed in snapshot. But you can simply fix it by moving the customField mapping to the method of the mapper where it should be used instead of putting it on mapper interface.
Specifying the simple class name in the custom field would also fix the build.
The bug was making the id field falling in the custom mapping specified for 'idA' because Selma was matchsing using a startsWith.
Hi,
I have a made a sample test case where selma doesn't retrieve a setter whereas it exists.
You can find it here : https://github.com/BenoitCharret/selma-test/tree/case_1
What I got is :
[ERROR] /home/benoit/projects/selma-test/src/main/java/com/test/SubElementMapper.java:[17,27] setter for field id from source bean com.test.from.SubSubElement is missing in destination bean com.test.to.AnotherSubElement !
[ERROR] --> Add @Mapper(withIgnoreFields="com.test.from.SubSubElement.id") / @maps(withIgnoreFields="com.test.from.SubSubElement.id") to mapper interface / method or add missing getter or specify corresponding @field to customize field to field mapping
[ERROR] setter for field id from destination bean com.test.to.AnotherSubElement has no getter in source bean com.test.from.SubSubElement !
[ERROR] --> Add @Mapper(withIgnoreFields="com.test.to.AnotherSubElement.id") / @maps(withIgnoreFields="com.test.to.AnotherSubElement.id") to mapper interface / method or add missing setter or specify corresponding @field to customize field to field mapping
But my object are
public class SubSubElement {
private String id;
}
and
public class AnotherSubElement {
}
Thanks for your help
The text was updated successfully, but these errors were encountered: