Francois Steyn (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMTlkNjYwMmE0...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16563?atlOrigin=eyJpIjoiMTlkNj...
) HHH-16563 (
https://hibernate.atlassian.net/browse/HHH-16563?atlOrigin=eyJpIjoiMTlkNj...
) Hibernate 6.x.x should use jakarta.annotation.Generated (
https://hibernate.atlassian.net/browse/HHH-16563?atlOrigin=eyJpIjoiMTlkNj...
)
Issue Type: Bug Affects Versions: 6.2.2 Assignee: Francois Steyn (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-jpamodelgen Created: 06/May/2023 02:53 AM Priority: Major
Reporter: Francois Steyn (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Currently the *@Generated* annotation is hard-coded to use *javax.annotation.Generated* or
*javax.annotation.processing.Generated* (depending on whats available)
This should probably change to jakarta.annotation.Generated
*Use case:* Executing the org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor using
maven-processor-plugin
*Workaround:* Setting addGeneratedAnnotation to false
Example generated code (current):
import jakarta.persistence.metamodel.SingularAttribute;
import jakarta.persistence.metamodel.StaticMetamodel;
import java.time.OffsetDateTime;
import javax.annotation.Generated;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor" )
@StaticMetamodel(BaseEntity.class)
public abstract class BaseEntity_ {
Example generated code (expected):
import jakarta.annotation.Generated;
import jakarta.persistence.metamodel.SingularAttribute;
import jakarta.persistence.metamodel.StaticMetamodel;
import java.time.OffsetDateTime;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor" )
@StaticMetamodel(BaseEntity.class)
public abstract class BaseEntity_ {
(
https://hibernate.atlassian.net/browse/HHH-16563#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16563#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#100225- sha1:7f918b6 )