Debugging getting objects from database