Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiM2U0ZGU3Mjhl...
) / Deprecation (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiM2U0ZG...
) HHH-15772 (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiM2U0ZG...
) deprecate @Target, @Proxy, @Polymorphism (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiM2U0ZG...
)
Change By: Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
The {{@Target}} annotation is not needed on associations, because the JPA mapping
annotations let you specify a {{target}} member.
The only possible usecase I can see for it is if you have an {{@Embeddable}} which
implements an interface and you don’t want to write your code around the concrete class
but … cmon, it’s not _really_ polymorphic. And once you go and stick {{@Embeddable}} on
it, you’ve tied your code to the concrete class _anyway_, just as much as if you had put
the concrete class in the type declaration instead of in an annotation.
So I say we deprecate this.
The {{@Proxy}} annotation could, in principle, be useful, but I’m struggling to see how
it’s supposed to be used in its current form. It feels like it would be more useful if it
specified a list of proxied types, or perhaps if it were inverted so that you could
_exclude_ a type from the proxied types. Even then, I just struggle to see that anyone has
a real need for this today. I think we can deprecate it for now, and if someone complains
then we will get a chance to explore what their real use case is and how it’s best
solved.
The {{@Polymorphism}} annotation just doesn’t seem useful. Worse, it’s very confusing to
users, who always think it means something else. It’s also badly-designed. (It would be
better if it were just a {{@ImplicitPolymorphismDisabled}} annotation with no members. So
lets deprecate this one too.
(
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#100210- sha1:eab5823 )