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
hi,I have a bug to report.
ContentEntityRestController's handleMultipart first find domainObj from JpaRepository,
and then set @ContentID、@MimeType、@originalFilename value to the domainObj,
and then check domainObj whether annotated @Version,if so find domainObj from JpaRepository again , but the domainObj changed ,don't have these value anymore , it seems persistence context changed.
The text was updated successfully, but these errors were encountered:
If I recall this is because ContentStore.setContent should return the entity but doesn't. This is a problem when @Version is applied to the entity. Hibernate will update it during save/persist and return the updated entity with the updated version field that setContent drops on the floor. If we dont re-fetch the entity then the subsequent save fails. I believe this works though because the re-fetch just grabs the (updated) entity out of its cache, rather than going back to the database. But, I could be wrong.
Is this failing for you? i.e. you are seeing the contentid, mime-type and original filename fields revert? Also what Spring Boot stack are you on? 2.1, or 2.2?
hi,I have a bug to report.
ContentEntityRestController's handleMultipart first find domainObj from JpaRepository,
and then set @ContentID、@MimeType、@originalFilename value to the domainObj,
and then check domainObj whether annotated @Version,if so find domainObj from JpaRepository again , but the domainObj changed ,don't have these value anymore , it seems persistence context changed.
The text was updated successfully, but these errors were encountered: