I have a simple entity with OneToMany relation :
@Column(name = \"TITLE\")
private String _title;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EA
Hibernate unfortunately simply doesn't allow you to do that. In an @PostLoad
method, you are not allowed to touch any association in the entity. This is a long standing major bug.
For the original bug see: https://issues.jboss.org/browse/JBAS-5474. After the bug was closed (while still unresolved), a new one was immediately re-opened here: https://hibernate.onjira.com/browse/HHH-6043
If this bug bugs you (I guess it does), please vote for it.