I dont have great concept-names for these yet, but i wanted to start a
discussion about a new set of thoughts running around in my head.
Essentially they relate to interacting with the JDBC Connection. The
current state of things is that we rely on the Dialect to know how to
perform those operations. But the Dialect is static information and so
cannot account for database configuration differences, for example. Its
why we end up with so many MySQL based dialects for example.
We have had a number of requests from Dialect developers/maintainers to
allow the Dialect to initialize itself from a Connection. But I still
agree we should avoid that.
However, I do think we need a way to allow Dialects to understand and
account for specifics of the underlying database.
Another thing that plays here is the expanded JDBC4 DatabaseMetadata,
now that master (4.0) can rely on Java 6. Take
DatabaseMetaData#locatorsUpdateCopy as an example. Using it we know how
to handle LOB data (mostly) when writing it to JDBC. Really we just
need the dialect to tell us if the DatabaseMetadata methods are
accurately implemented in the driver. I see this as a common them
starting to emerge.
So I started thinking about a class which manages all this for us. In
fact, we may already have such a class in
Steve Ebersole <steve(a)hibernate.org>