POST_UPDATE not raised in OneToMany join
Hi, I have an entities like bellow:
@Entity
@Table(name = "SET")
@EntityListeners({EventEntityListener.class})
public class SetEntity implements Serializable {
@Id
@Column(name = "ID")
private Integer id;
@Column(name = "TYPE")
private ValueType valueType;
@OneToMany(mappedBy = "setValueId.id", targetEntity = SetValueEntity.class,
fetch = FetchType.EAGER, cascade=CascadeType.ALL, orphanRemoval = true)
private List<SetValueEntity> setValues;
}
@Embeddable
public class SetValueID implements Serializable {
@Column(name="ID")
private Integer id;
}
@Entity
@Table(name = "SET_VALUE")
public class SetValueEntity implements Serializable {
@EmbeddedId
private SetValueID setValueId;
@Column(name = "VALUE")
private String setValue;
}
I expected get POST_UPDATE, PRE_PERSIST and PRE_REMOVE event when call save on parent entity because of cascading all of operations. is there any solution to do this?
This sounds very much like an issue with the persistence provider in use. Please try creating a reproducer that is using the plain EntityManager and potentially submit an issue in the JPA providers Bug Tracker.
If you think this is actually a Spring Data issue, please provide a reproducer for the issue including a test case that demonstrates the correct behaviour using the EntityManager directly.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.