here's the JPA2 entity listener annotations:
@PrePersist
@PreRemove
@PostPersist
@PostRemove
@PreUpdate
@PostUpdate
@PostLoad
However there is no @PreLoad annotation? How can that be?
here's the JPA2 entity listener annotations:
@PrePersist
@PreRemove
@PostPersist
@PostRemove
@PreUpdate
@PostUpdate
@PostLoad
However there is no @PreLoad annotation? How can that be?
I would apply the same knowledge as with JSF - what is the difference between @PostConstruct and direct method call from constructor?. @PostLoad
is executed after the constructor and has all JPA
related dependencies ready and the object of this class is actually @Entity
and not a simple Java
object. So non-existent @PreLoad
would actually be constructor, but the @Entity
is not an @Entity
yet before @PostLoad
.