Nathan Xu (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-13867 (
https://hibernate.atlassian.net/browse/HHH-13867?atlOrigin=eyJpIjoiY2RlN2...
)
Re: StaleObjectStateException into a SINGLE transaction for entity with version field of
type java.util.Date (
https://hibernate.atlassian.net/browse/HHH-13867?atlOrigin=eyJpIjoiY2RlN2...
)
It turns out that the root cause is MySQL doesn’t adhere to SQL standard that default
TIMESTAMP type’s fractional second precision should be 6 (to maintain backward
compatibility). See
https://dev.mysql.com/doc/refman/5.6/en/fractional-seconds.html
In your specific case, if you specify precision explicitly, the bug should disappear.
However, this seems still a bug of Hibernate in terms of MySQL dialect issue. I’ll think
about how to fix it later soon.
Thanks for your report!
(
https://hibernate.atlassian.net/browse/HHH-13867#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13867#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100120- sha1:2415f4c )