Jpa prepersist callback not called on parent [message #1433215] |
Sun, 28 September 2014 11:30 |
kraken kraken Messages: 3 Registered: January 2013 |
Junior Member |
|
|
My code
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class SiteMessage implements Identifiable{
@PrePersist
public void onCreate1(){
System.out.println("Executed onCreate1");
}
}
@Entity
@Table(name = "feedback")
public class Feedback extends SiteMessage {
@PrePersist
public void onCreate2(){
System.out.println("Executed onCreate2");
}
}
When i save Feedback entity i expect that i will see: Executed onCreate1 and Executed onCreate2, but i've seen only Executed onCreate2
I've created a test repo: https:// github.com/ SunPj/ eclipselink-h2-jpa
(please remove spaces from url, sorry, i don't have permission to add a link to post)
[Updated on: Sun, 28 September 2014 11:31] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02175 seconds