Since you are setting other database/driver specific information on the
login, it is probably not a big deal to also set the platform.
In JPA if you do not set the platform it is auto-detected by default.
Using the native API you can do this by calling loginAndDetectDatasource()
on DatabaseSessionImpl instead of login().