Fixed logic errors in onUpdate() routine

- was incorrectly calling array_intersect_key()
- was using array_merge when I shouldn't
- wrong arguments to hydrate()