Stefan Lindner (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMDJiMDNiOTZi...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-13887?atlOrigin=eyJpIjoiMDJiMD...
) HHH-13887 (
https://hibernate.atlassian.net/browse/HHH-13887?atlOrigin=eyJpIjoiMDJiMD...
) Multiple @PostLoad (in @Entity and @MappedSuperclass) (
https://hibernate.atlassian.net/browse/HHH-13887?atlOrigin=eyJpIjoiMDJiMD...
)
Issue Type: Bug Affects Versions: 5.3.11 Assignee: Unassigned Components:
hibernate-entitymanager Created: 03/Mar/2020 14:31 PM Environment: Adopt
OPENJDK11/OpenJ9
Wildfly 18.0.1
Win 10/64bit
PÜostgreSQL 12 Priority: Major Reporter: Stefan Lindner (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Using @PostLoad in a @MappedSuperclass does not work it the annotated method has the same
name as in @Entity class.
I did not find any hints in the specs about the behavior in this case. Is it allowed?
The SuperClass ist part of another module than EntityClass.
This does not work
------------------
*SuperClass.java*
@MappedSuperclass
public abstract Superclass {
@PostLoad
public void postLoad() {
System.out.println( "Superclass.postLoad" );
}
}
*EntityClass.java*
@Entity
public class EntityClass extends SuperClass {
@PostLoad
public void postLoad() {
System.out.println( "Superclass.postLoad" );
}
}
This works
----------
*SuperClass.java*
@MappedSuperclass
public abstract Superclass {
@PostLoad
public void otherPostLoad() {
System.out.println( "EntityClass .postLoad" );
}
}
*EntityClass.java*
@Entity
public class EntityClass extends SuperClass {
@PostLoad
public void postLoad() {
System.out.println( "EntityClass .postLoad" );
}
}
(
https://hibernate.atlassian.net/browse/HHH-13887#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13887#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#100121- sha1:a532aba )