public function filterByAttribute($attribute, $comparison = null)
    {
        if ($attribute instanceof \Thelia\Model\Attribute) {
            return $this
                ->addUsingAlias(AttributeAttributeTypeTableMap::ATTRIBUTE_ID, $attribute->getId(), $comparison);
        } elseif ($attribute instanceof ObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(AttributeAttributeTypeTableMap::ATTRIBUTE_ID, $attribute->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByAttribute() only accepts arguments of type \Thelia\Model\Attribute or Collection');
        }
    }
public function filterByAttribute($attribute, $comparison = null)
    {
        if ($attribute instanceof \Thelia\Model\Attribute) {
            return $this
                ->addUsingAlias(AttributeAttributeTypeTableMap::ATTRIBUTE_ID, $attribute->getId(), $comparison);
        } elseif ($attribute instanceof ObjectCollection) {
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }

            return $this
                ->addUsingAlias(AttributeAttributeTypeTableMap::ATTRIBUTE_ID, $attribute->toKeyValue('PrimaryKey', 'Id'), $comparison);
        } else {
            throw new PropelException('filterByAttribute() only accepts arguments of type \Thelia\Model\Attribute or Collection');
        }
    }
public function filterByAttribute ( $ attribute , $ comparison = null ) { if ( $ attribute instanceof \ Thelia \ Model \ Attribute ) { return $ this -> addUsingAlias ( AttributeAttributeTypeTableMap :: ATTRIBUTE_ID , $ attribute -> getId ( ) , $ comparison ) ; } elseif ( $ attribute instanceof ObjectCollection ) { if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } return $ this -> addUsingAlias ( AttributeAttributeTypeTableMap :: ATTRIBUTE_ID , $ attribute -> toKeyValue ( 'PrimaryKey' , 'Id' ) , $ comparison ) ; } else { throw new PropelException ( 'filterByAttribute() only accepts arguments of type \Thelia\Model\Attribute or Collection' ) ; } }
Filter the query by a related \Thelia\Model\Attribute object

@param \Thelia\Model\Attribute|ObjectCollection $attribute The related object(s) to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

@return ChildAttributeAttributeTypeQuery The current query, for fluid interface
Filter the query by a related \ Thelia \ Model \ Attribute object