protected function _includeParameter($includes, Subject $subject, $options)
    {
        if (is_string($includes)) {
            $includes = explode(',', $includes);
        }
        $includes = Hash::filter((array)$includes);

        if (empty($includes)) {
            return;
        }

        if ($options['blacklist'] === true || $options['whitelist'] === false) {
            throw new BadRequestException("The include parameter is not supported");
        }

        $this->setConfig('include', []);

        $includes = Hash::expand(Hash::normalize($includes));
        $blacklist = is_array($options['blacklist']) ? Hash::expand(Hash::normalize(array_fill_keys($options['blacklist'], true))) : $options['blacklist'];
        $whitelist = is_array($options['whitelist']) ? Hash::expand(Hash::normalize(array_fill_keys($options['whitelist'], true))) : $options['whitelist'];
        $contains = $this->_parseIncludes($includes, $blacklist, $whitelist, $subject->query->getRepository());

        $subject->query->contain($contains);

        $this->setConfig('include', []);
        $associations = $this->_getContainedAssociations($subject->query->getRepository(), $contains);
        $include = $this->_getIncludeList($associations);

        $this->setConfig('include', $include);
    }