|SQL handling in CDO [message #615401]
||Tue, 05 February 2008 15:39
| Stefan Winkler
Registered: July 2009
I created a patch to my bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217255 which fixes the
date issues in mysql.
When I was debugging to find out where the objects and revisions are
retrieved I found out that you store objects using the stringbuilder to
create the complete SQL statement, but you use the JDBC
ResultSet.getXxx() methods to retrieve values.
Why is that? Storing the date using a JDBC Statement together with
?-Placeholders and set-methods like setTimestamp would have been easier
and more error-proof than the stringbuilding thing (also it would make
db-adapters smaller, as most of the appendValue-logic is already
implemented in JDBC).
The problem is also, that it is a bit unclear how the MySQL JDBC-driver
handles timezones. So expect timezones not to work with my patch above ...
I would open a bug for the stringbuilder <-> JDBC inconsistence, because
I think this is a design problem. However, the changes would be rather
large and I guess the Teneo-CDO-integration will replace the CDO
relational mapping anyway, eventually eliminating potential issues.
Powered by FUDForum
. Page generated in 0.02513 seconds