You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AbstractEntity is setting the transient isNew flag in an @PostPersist method. The invocation of that method can be delayed until actual database interaction by the JPA provider which might result in an entity instance being returned as new from a call to CrudRepository.save(…).
We should move to tweaking the flag in @PrePersist.
The text was updated successfully, but these errors were encountered:
…ostPersist.
This is to make sure that the persistence provider actually flips the flag in CrudRepository.save(…) or EntityManager.persist(…) to be precise.
With the previous implementation the entity was returned from CrudRepository.save(…) as new which is wrong in itself but also caused test errors trying immediate subsequent deletions that run into an early return due to optimizations introduced for DATAJPA-1535.
AbstractEntity
is setting the transientisNew
flag in an@PostPersist
method. The invocation of that method can be delayed until actual database interaction by the JPA provider which might result in an entity instance being returned as new from a call toCrudRepository.save(…)
.We should move to tweaking the flag in
@PrePersist
.The text was updated successfully, but these errors were encountered: