-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dozer partially case sensitive in 5.5.1 #195
Comments
This seems like kind of a HUGE problem, since it totally breaks automatic mapping for any properties with different cases in the getters or setters. |
I am also facing the same problem with version 5.5.1 .please share the fix for this case sensitive issue. |
Does anyone know if this has been fixed? The only workaround we've found is to manually list out every single property name in the mapping files, which is obviously a really undesirable option. |
+1 |
I'm also facing the same issue |
I getting the impression that Dozer development is stopped, unfortunately. I see there's only been 4 commits in the last year. :-( It might be fork time... |
@brian428 ; I am trying to get Dozer active again. Happy for any pull requests / help. |
Closing due to inactivity. |
I'd like to maintain backwards compatibility by optionally supporting case insensitive mapping. I can think of two ways to implement this:
@garethahealy Which would you prefer? Also, I'm unsure what should happen if a class defines two parameters that are equal except for their case. This affects both the filter step for already mapped fields as well as the field alignment. |
@grubeninspekteur ; Configuration options sounds best. |
Field mappings are apparently now partially case sensitive in Dozer 5.5.1. There appears to be no option to switch back to the 5.4.0 case-insensitive mappings.
Example from discussion at https://groups.google.com/forum/#!topic/dozer-mapper/k6i_Bf6ZIMc.
import org.dozer.DozerBeanMapper;
public class App {
public static void main(String[] args) {
DozerBeanMapper mapper = new DozerBeanMapper();
UpperCaseBean src = new UpperCaseBean();
src.setMYSTRING("This is from the upper case bean");
LowerCaseBean dst = new LowerCaseBean();
mapper.map(src, dst);
System.out.println(dst.getmystring());
}
public static class UpperCaseBean {
private String MYSTRING;
public String getMYSTRING() {
return MYSTRING;
}
public void setMYSTRING(String MYSTRING) {
this.MYSTRING = MYSTRING;
}
}
public static class LowerCaseBean {
private String mystring;
public void setmystring(String mystring) {
this.mystring = mystring;
}
public String getmystring() {
return this.mystring;
}
}
}
With the following mapping, the "mystring" field will not be mapped:
UpperCaseBean LowerCaseBeanHowever, with the following mapping, the field "mystring" will be mapped:
UpperCaseBean LowerCaseBean mystring mystringThis seems like very counter-intuitive behavior. It would be nice to simply add a configuration option to control this behavior.
The text was updated successfully, but these errors were encountered: