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
it looks like that selma get confused when field's name ends with the name of the containing class.
When executed on the following classes:
public class Source {
private String name;
public String getName() { return name; }
public void setName(String field) { this.name = field; }
}
public class Target {
public static class Bean {
private String name;
public String getName() { return name; }
public void setName(String field) { this.name = field; }
}
// Field name suffix is equal to class name
private Bean fieldTarget;
public Bean getFieldTarget() { return fieldTarget; }
public void setFieldTarget(Bean fieldTarget) { this.fieldTarget = fieldTarget; }
}
@Mapper
public interface BeanMapper {
@Maps( withCustomFields = @Field({"name", "fieldTarget.name"}))
Target toBean(Source b);
}
generate the following error:
[ERROR] diagnostic: ..../selma-test/src/main/java/test/selma/BeanMapper.java:11: error: Mapping custom field name from source bean test.selma.Source, setter for field fieldname is missing in destination bean test.selma.Target !
Target toBean(Source b);
^
--> Check your custom field @Field{ "fieldtarget.name", "name"}, you can add simple class name or FQCN to the longest field path or add missing getter
The text was updated successfully, but these errors were encountered:
Hello,
it looks like that selma get confused when field's name ends with the name of the containing class.
When executed on the following classes:
generate the following error:
The text was updated successfully, but these errors were encountered: