Add a feature request to Jira I guess. Of course you can already achieve this using a custom ConnectionProvider and most connection pools allow such things. For me personally this is not a critical feature.
On Mon, May 13, 2019 at 7:57 AM Jordan Gigov <colad...@gmail.com> wrote: > I thought it would be good to have an API that will call any registered > queries upon connecting to the database, and maybe ones before returning it > to the connection pool. > I'm thinking it should be called in the implementations of > ConnectionProvider > and MultiTenantConnectionProvider. > > The basic purpose would be so you can set certain parameters. For example > in setting the timezone in PostgreSQL: > > SET SESSION TIME ZONE 'UTC'; > > Or in MySQL: > > SET SESSION time_zone = 'Europe/Berlin'; > > This would of course require dialect handling, and access to some of the > configuration settings given to the SessionFactory. > There should also be a way for users to customize these with a > per-persistence-unit configuration of some sort. They might want to pass > other such runtime tweaks. > Someone may want to send something like this to their MySQL: > > SET SESSION sql_mode = 'TRADITIONAL,ANSI'; > > I realize it's too late to think about this for 6.0, but it's something to > consider for later on. > _______________________________________________ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev