[hibernate-dev] JPA Events
Petar Tahchiev
paranoiabla at gmail.com
Mon Mar 19 10:41:54 EDT 2018
Hi guys,
I opened an issue in the JPA spec here yesterday:
https://github.com/javaee/jpa-spec/issues/167
because @PreUpdate and @PrePersist events are not fired when I save a
collection on the owner. Since then, a discussion with Oliver Gierke from
the SpringDATA team started and I wanted to know your opinion on this.
Basically the question is: if you have Product with a Collection<String>
attribute and you update the collection, shall @PreUpdate event be fired.
As Oliver mentioned the JPA spec says:
-------
The PreUpdate and PostUpdate callbacks occur before and after the database
update operations to entity data respectively.
-------
so to me it is obvious that when an attribute of the Product is changed
then this means that @PreUpdate event for the Product must be fired.
What do you think? Should I open a bug in Hibernate?
--
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611
More information about the hibernate-dev
mailing list