Amended code for object loading based on the toOne() hydration.

Unit tests also fixed to mock getIdentifier() so that the correct
identifier fields are returned.