public function findOneByCompoundKey(array $compoundKeyValues)
    {
        if (empty($compoundKeyValues)) {
            throw new \InvalidArgumentException(
                get_class($this) . '::compoundKeyValues must not be empty.',
                1354976660
            );
        }

        try {
            $model = $this->findOneByCompoundKeyFromCache($this->extractCompoundKeyValues($compoundKeyValues));
        } catch (\Tx_Oelib_Exception_NotFound $exception) {
            $model = $this->findSingleByWhereClause($compoundKeyValues);
        }

        return $model;
    }
public function findOneByCompoundKey(array $compoundKeyValues)
    {
        if (empty($compoundKeyValues)) {
            throw new \InvalidArgumentException(
                get_class($this) . '::compoundKeyValues must not be empty.',
                1354976660
            );
        }

        try {
            $model = $this->findOneByCompoundKeyFromCache($this->extractCompoundKeyValues($compoundKeyValues));
        } catch (\Tx_Oelib_Exception_NotFound $exception) {
            $model = $this->findSingleByWhereClause($compoundKeyValues);
        }

        return $model;
    }
public function findOneByCompoundKey ( array $ compoundKeyValues ) { if ( empty ( $ compoundKeyValues ) ) { throw new \ InvalidArgumentException ( get_class ( $ this ) . '::compoundKeyValues must not be empty.' , 1354976660 ) ; } try { $ model = $ this -> findOneByCompoundKeyFromCache ( $ this -> extractCompoundKeyValues ( $ compoundKeyValues ) ) ; } catch ( \ Tx_Oelib_Exception_NotFound $ exception ) { $ model = $ this -> findSingleByWhereClause ( $ compoundKeyValues ) ; } return $ model ; }
Looks up a model by a compound key.

This function will first check the cache-by-key and, if there is no match,
will try to find the model in the database.

@param string[] $compoundKeyValues
existing key value pairs, must not be empty
The array must have all the keys that are set in the additionalCompoundKey array.
The array values contain the model data with which to look up.

@throws \InvalidArgumentException if parameter array $keyValue is empty
@throws \Tx_Oelib_Exception_NotFound if there is no match (neither in the cache nor in the database)

@return \Tx_Oelib_Model the cached model
Looks up a model by a compound key .