雨森郷太郎 wrote:
> However, Is there reason to refrain from supporting java.util.Date ?
Despite the name, java.util.Date actually contains both date and time
information, and mapping it to SQL's DATE would silently lose data.
That's why java.sql.Date exists in the first place: it's a deliberately
limited subclass that explicitly only carries date information.
We could map java.util.Date to TIMESTAMP, I suppose, but I think that'll
cause even more confusion since there's also java.sql.Timestamp (that
gives nanosecond precision vs. java.util.Date's millisecond precision).
Most of the time, using java.util.Date with JDBC means you've got an
application bug, and I don't think silently covering it up is a great idea.
-O