public function fetch($identifier, $version=null)
    {
        $portableElements = $this->getAllVersions($identifier);

        // No version, return latest version
        if (is_null($version)) {
            $this->krsortByVersion($portableElements);
            return $this->getModel()->createDataObject(reset($portableElements));
        }

        // Version is set, return associated record
        if (isset($portableElements[$version])) {
            return $this->getModel()->createDataObject($portableElements[$version]);
        }

        // Version is set, no record found
        throw new PortableElementNotFoundException(
            $this->getModel()->getId() . ' with identifier ' . $identifier. ' found, '
            . 'but version "' . $version . '" does not exist.'
        );
    }