Affects Version/s: 3.5
Fix Version/s: None
With attachment versioning turned on (default behavior) and hibernate store set for everything. (default)
- Upload a file as an attachment.
A versioned entry will appear in the xwikiattachment_archive table.
- Turn off attachment versioning.
- Restart the webserver.
- Remove the attachment from the page.
- The versioned attachment will still be in xwikiattachment_archive (it is not removed)
- Add an attachment with the same filename to the original page
- The versioned attachment still in the xwikiattachment_archive will have the same XWA_ID as the new attachment.
If you turn on attachment versioning again the old versioned attachment will be visible again for the new attachment with same filename.
Shouldn't the old xwikiattachment_archive content be removed when the attachment is removed if it has the same XWA_ID as the removed attachment's XWA_ID?