Closed CurryPotato closed 3 years ago
This works as designed. MapStruct uses the Java bean mapping convention to detect the properties.
Your setters or most likely looking like setPName
. When the second character is upper case we do not lowercase the first one. That's why the name of the property is PName
javabean support uppercase abbreviation field like XMLName. so a javabean field like XXxxx and xxXxxx is right , and xXxxx and Xxxx is wrong . thank you!
mapstruct version: 1.4.1.Final jdk version: 8
when I compile these class, I get a compile error.
Error:(26, 12) java: Unknown property "pName" in result type DriverDTO. Did you mean "PName"?
but I make target = "pName" -> target = "PName" , I get a correct result.