Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOTQ5NWQ5ZDhj...
) / Deprecation (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiOTQ5NW...
) HHH-15772 (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiOTQ5NW...
) deprecate @Target (
https://hibernate.atlassian.net/browse/HHH-15772?atlOrigin=eyJpIjoiOTQ5NW...
)
Issue Type: Deprecation Assignee: Unassigned Created: 27/Nov/2022 14:14 PM Priority: Minor
Reporter: 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.
(
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 )