public function find($entity)
    {
        $conditions = array();

        if (is_array($entity)) {
            foreach ($entity as $key => $value) {
                $conditions[$this->_target_property.'.'.$key] = $value;
            }
        } else {
            $conditions[$this->_target_property] = $entity;
        }

        $conditions[$this->_property] = $this->_root;

        return $this->_child->find($conditions);
    }
public function find($entity)
    {
        $conditions = array();

        if (is_array($entity)) {
            foreach ($entity as $key => $value) {
                $conditions[$this->_target_property.'.'.$key] = $value;
            }
        } else {
            $conditions[$this->_target_property] = $entity;
        }

        $conditions[$this->_property] = $this->_root;

        return $this->_child->find($conditions);
    }
public function find ( $ entity ) { $ conditions = array ( ) ; if ( is_array ( $ entity ) ) { foreach ( $ entity as $ key => $ value ) { $ conditions [ $ this -> _target_property . '.' . $ key ] = $ value ; } } else { $ conditions [ $ this -> _target_property ] = $ entity ; } $ conditions [ $ this -> _property ] = $ this -> _root ; return $ this -> _child -> find ( $ conditions ) ; }
Find an entity within this collection.

@param AnDomainEntityAbstract|array $entity

@return AnDomainEntityAbstract
Find an entity within this collection .