[hibernate-issues] [JIRA] (HHH-14020) Allow Hibernate Types to have access to ServiceRegistry during initialization

Vlad Mihalcea (JIRA) jira at hibernate.atlassian.net
Fri May 15 05:37:49 EDT 2020


Vlad Mihalcea ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Af5e8c0d3-3aae-4bb4-a4e1-25463d60d232 ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMWI3ZTFiZjI5YWUwNGI1M2I2YjczYzA2YTFhODE2ZDQiLCJwIjoiaiJ9 ) / Improvement ( https://hibernate.atlassian.net/browse/HHH-14020?atlOrigin=eyJpIjoiMWI3ZTFiZjI5YWUwNGI1M2I2YjczYzA2YTFhODE2ZDQiLCJwIjoiaiJ9 ) HHH-14020 ( https://hibernate.atlassian.net/browse/HHH-14020?atlOrigin=eyJpIjoiMWI3ZTFiZjI5YWUwNGI1M2I2YjczYzA2YTFhODE2ZDQiLCJwIjoiaiJ9 ) Allow Hibernate Types to have access to ServiceRegistry during initialization ( https://hibernate.atlassian.net/browse/HHH-14020?atlOrigin=eyJpIjoiMWI3ZTFiZjI5YWUwNGI1M2I2YjczYzA2YTFhODE2ZDQiLCJwIjoiaiJ9 )

Change By: Vlad Mihalcea ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Af5e8c0d3-3aae-4bb4-a4e1-25463d60d232 )

[HHH-13103|https://hibernate.atlassian.net/browse/HHH-13103] added support for getting access to configuration properties when instantiating a Hibernate Type.

However, there are still two issues I'm facing in the \ [Hibernate Types project |[https://github.com/vladmihalcea/hibernate-types|https://github.com/vladmihalcea/hibernate-types|smart-link ] ( ][:| https://github.com/vladmihalcea/hibernate-types): ]

- * the new {{TypeBootstrapContext}} only works from 5.4.13 onwards, so if I add this constructor, any prior Hibernate version will fail with a {{NoClassDeffFoundError}}.
- * I need to get access to the underlying Driver Type to adjust how a certain Type handles arrays, for instance.

For this reason, I propose we inject the {{ SessionFactoryImplementor ServiceRegistry }} when initializing the Type if there is a matching constructor taking this argument.

( https://hibernate.atlassian.net/browse/HHH-14020#add-comment?atlOrigin=eyJpIjoiMWI3ZTFiZjI5YWUwNGI1M2I2YjczYzA2YTFhODE2ZDQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14020#add-comment?atlOrigin=eyJpIjoiMWI3ZTFiZjI5YWUwNGI1M2I2YjczYzA2YTFhODE2ZDQiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100126- sha1:acdbdcc )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200515/3bce2490/attachment.html 


More information about the hibernate-issues mailing list