public function find($needle, $fetch = true)
    {
        if (empty($needle)) {
            throw new InvalidArgumentException('No condition pased to the repository::find');
        }

        if (!is_array($needle)) {
            $needle = array($this->_description->getIdentityProperty()->getName() => $needle);
        }

        $found = null;
        //there's a key in the needle then it must be a unique entity
        if (count(array_intersect_key($this->_description->getIdentifyingProperties(), $needle)) > 0) {
            $found = $this->_space->findEntity($this->_description, $needle);
        } else {
            $entities = $this->getEntities();
            $found = $entities->find($needle);
        }

        if (!$found && $fetch) {
            $this->getCommandChain()->disable();
            $query = $this->getQuery()->where($needle);
            $found = $this->fetch($query);
            $this->getCommandChain()->enable();
        }

        return $found;
    }