Add hibernate hook.