Bug 1115725 - Operation history continues to grow unbound with no easy way to purge old history

Fix an issue on Oracle, no ID conversion needed, Hibernate does it

Also, some code cleanup

Cherry picked from 584e51683a46cac10e417083a543b60b280b7b75