JPA 2.1 Create entity within JPA EntityListener
问题 I try to create a log entry as soon as one of my entities got changed or created. In order to do this, I registered an EntityListener on an AbstractEntity class. AbstractEntity has a List of LogEntries and the cascade type of this list is ALL (all of my entities inherits from AbstractEntity). Current implementation of my EntityListener: public class EntityChangeListener { @Inject SessionController sessionController; @PreUpdate public void preUpdate(AbstractEntity entity) { createLogEntryFor