Daniel John Debrunner wrote:
I'm trying to understand the expected behaviour of the assignment of
columns from an EOD SQL @Select to a data class using JavaBeans style
property accessors. I'm looking at section "19.1.5 User Class" of JDBC 4.0.
I have a class similar to the example but a little different. The
difference is the private field name does not match the name of the
JavaBean property, is that allowed?
public class Person
{
private String myName;
public void setName(String name) {
this.myName = name;
}
public String getName() {
return myName;
}
}
If my select returns a column called 'NAME' then it does not map to the
JavaBean property called 'name'. Instead the name of the column needs to
map to the name of the private field, 'myName'. Then the field is set
correctly but the setter is never used. Is this a bug, it seems like it?
If I understand you correctly, I believe it is a known bug that I
stumbled on myself a while ago. I thought it had been fixed in one of
the latest Mustang builds but I haven't verified it myself. Which build
have you been using?
Vemund