4

here's the JPA2 entity listener annotations:

@PrePersist
@PreRemove
@PostPersist
@PostRemove
@PreUpdate
@PostUpdate
@PostLoad

However there is no @PreLoad annotation? How can that be?

Petar Tahchiev
  • 4,336
  • 4
  • 35
  • 48

1 Answers1

2

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.

Community
  • 1
  • 1
ptrdom
  • 100
  • 9