Jones (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-15772 (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiZmRkYT...
)
Re: deprecate @Target, @Proxy, @Polymorphism (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiZmRkYT...
)
About the @Proxy annotation.
We’re using extensively in our application (300+ entities has it)
For all these cases, I believe 100% of them we’re using as @Proxy(lazy=false) to annotate
an entity in an entity hierarchy using single table and column discriminators. Without the
annotation, it’s very common that hibernate loads a proxy, instead of the real entity
class which very often leads to some ClassCastException in several places.
The
https://hibernate.atlassian.net/browse/HHH-16254 (
https://hibernate.atlassian.net/browse/HHH-16254 ) is one example that hibernate behaves
differently from the hibernate 5.x series. An proxy is returned if I’m using cache, fetch
mode select and batch fetch. If I change one of these parameters, like drop the cache, or
disable batch fetch, hibernate will not return me a proxy, but the real entity.
For our use cases, what’s important is to have a way to configure our mappings that a
proxy won’t be returned, but the real class.
I’m very interested in discuss this further and provide more info if needed in order to
see how this situation is best solved.
(
https://hibernate.atlassian.net/browse/HHH-15772#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15772#add-comment?atlOrigin=ey...
)
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....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:45db922 )