Stefan Lindner (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNjA2YWI1ODk4...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-13887?atlOrigin=eyJpIjoiNjA2YW...
) HHH-13887 (
https://hibernate.atlassian.net/browse/HHH-13887?atlOrigin=eyJpIjoiNjA2YW...
) Multiple @PostLoad (in @Entity and @MappedSuperclass) (
https://hibernate.atlassian.net/browse/HHH-13887?atlOrigin=eyJpIjoiNjA2YW...
)
Change By: 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.
h3. This does not work
*SuperClass.java*
{code: title=SuperClass. java |borderStyle=solid }
@MappedSuperclass
public abstract Superclass {
@PostLoad
public void postLoad() {
System.out.println("Superclass.postLoad");
}
}
{code}
*EntityClass.java*
{code: title=EntityClass. java |borderStyle=solid }
@Entity
public class EntityClass extends SuperClass {
@PostLoad
public void postLoad() {
System.out.println(" Superclass EntityClass.postLoad");
}
}
{code}
h3. This works
*SuperClass.java*
{code: title=SuperClass. java |borderStyle=solid }
@MappedSuperclass
public abstract Superclass {
@PostLoad
// |||||||||||||
// VVVVVVVVVVVVV
public void otherPostLoad() {
System.out.println(" EntityClass Superclass.postLoad");
}
}
{code}
*EntityClass.java*
{code: title=EntityClass. java |borderStyle=solid }
@Entity
public class EntityClass extends SuperClass {
@PostLoad
public void postLoad() {
System.out.println("EntityClass .postLoad");
}
}
{code}
(
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 )