db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject possible JDBC 4 EOD bug??
Date Fri, 15 Sep 2006 01:07:08 GMT
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?

Thanks,
Dan.


Mime
View raw message