Gail Badner (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-13909 (
https://hibernate.atlassian.net/browse/HHH-13909?atlOrigin=eyJpIjoiZGRhZT...
)
Re: Throw an exception if a final entity class is explicitly mapped as lazy (
https://hibernate.atlassian.net/browse/HHH-13909?atlOrigin=eyJpIjoiZGRhZT...
)
The user guide (
https://docs.jboss.org/hibernate/orm/5.4/userguide/html_single/Hibernate_...
) says:
"However, if the entity class is final, Javassist will not create a proxy and you
will get a POJO even when you only need a proxy reference. In this case, you could proxy
an interface that this particular entity implements, as illustrated by the following
example."
Example 117 in that section shows how an entity can be lazily loaded for a final class if
@Proxy(proxyClass=...) is configured.
Steve Ebersole (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) , IIUC, there should be no exception in that case.
BTW, for the fix for HHH-13891 (
https://hibernate.atlassian.net/browse/HHH-13891 ) Open ,
ProxyFactoryHelper#validateProxyability throws a HibernateException which is ulitmately
caught and logged as warning here (
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src...
).
Do you think it makes sense to throw an exception in this case (as opposed to logging as a
warning)?
Sanne Grinovero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) , does this cover the case you mentioned?
(
https://hibernate.atlassian.net/browse/HHH-13909#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13909#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#100122- sha1:092c6a7 )