Hi,
trying to use JdbcTemplateMapperFactory....newRowMapper(MyPojo.class) and found a bug:
My pojo is defined as:
class MyPojo {
@Column(length=5)
String foo;
@Column(length=5)
String bar;
//get/set
}
Note that no attribute "name" is defined in the @Column annotation.
Then the mapping just not work.
The explanation is that ObjectClassMeta.getAlias(..) will return "" (empty string) instead of the field name.
The reason is that "fieldAliases" is populated with "" (empty string) because we found the @Column annotation but name is not set.
A possible patch is to modify ObjectClassMeta.getAlias(..) line 249 with something like:
if (columnName == null || columnName.isEmpty()) {
Maybe a better path is to populate "fieldAliases" in the right way.
Sorry, I have no github account neither the time to create a good test case right now.
Thank you for your work on such great and usefull project.
Christophe.