I would like to use the type java.sql.Timestamp in my ResultMap, but I am getting:
Check the Result Map. Check the 'timestamp' property. Cause: java.sql.SQLException: Could not apply result map to property named 'timestamp'. Unknown type encountered (class java.sql.Timestamp). Please use a supported type or associate a mapped-statement with this type.
It looks like I might be able to use this type, as noted on page 11 of the documentation, but when I explicitly declare the type "TIMESTAMP" next to the property that is declared java.sql.Timestamp, I still have the problem.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The great thing about the framework is that you can isolate your business objects from java.sql.* types. There is no need to declare the property as type java.sql.Timestamp. Simply declare your property as a java.util.Date and it will be retrieved using ResultSet.getTimeStamp(). If you want to explicitly use DATE or TIME types, or if the column is nullable, then you will want to specify type="..." in the <property> element.
Cheers,
Clinton
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to use the type java.sql.Timestamp in my ResultMap, but I am getting:
Check the Result Map. Check the 'timestamp' property. Cause: java.sql.SQLException: Could not apply result map to property named 'timestamp'. Unknown type encountered (class java.sql.Timestamp). Please use a supported type or associate a mapped-statement with this type.
It looks like I might be able to use this type, as noted on page 11 of the documentation, but when I explicitly declare the type "TIMESTAMP" next to the property that is declared java.sql.Timestamp, I still have the problem.
Thanks
The great thing about the framework is that you can isolate your business objects from java.sql.* types. There is no need to declare the property as type java.sql.Timestamp. Simply declare your property as a java.util.Date and it will be retrieved using ResultSet.getTimeStamp(). If you want to explicitly use DATE or TIME types, or if the column is nullable, then you will want to specify type="..." in the <property> element.
Cheers,
Clinton