class ProductCategoryQuery extends ModelCriteria

Base class that represents a query for the 'product_category' table.

Methods

__construct( string $dbName = 'thelia', string $modelName = '\\Thelia\\Model\\ProductCategory', string $modelAlias = null)

Initializes internal state of \Thelia\Model\Base\ProductCategoryQuery object.

create( string $modelAlias = null, Criteria $criteria = null)

Returns a new ChildProductCategoryQuery object.

ProductCategory|array|mixed
findPk($key, $con = null)

Find object by primary key.

ObjectCollection|array|mixed
findPks( array $keys, ConnectionInterface $con = null)

Find objects by primary key $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);

filterByPrimaryKey( mixed $key)

Filter the query by primary key

filterByPrimaryKeys( array $keys)

Filter the query by a list of primary keys

filterByProductId( mixed $productId = null, string $comparison = null)

Filter the query on the product_id column

filterByCategoryId( mixed $categoryId = null, string $comparison = null)

Filter the query on the category_id column

filterByDefaultCategory( boolean|string $defaultCategory = null, string $comparison = null)

Filter the query on the default_category column

filterByPosition( mixed $position = null, string $comparison = null)

Filter the query on the position column

filterByCreatedAt( mixed $createdAt = null, string $comparison = null)

Filter the query on the created_at column

filterByUpdatedAt( mixed $updatedAt = null, string $comparison = null)

Filter the query on the updated_at column

filterByProduct( Product|ObjectCollection $product, string $comparison = null)

Filter the query by a related \Thelia\Model\Product object

joinProduct( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Adds a JOIN clause to the query using the Product relation

useProductQuery( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Use the Product relation Product object

filterByCategory( Category|ObjectCollection $category, string $comparison = null)

Filter the query by a related \Thelia\Model\Category object

joinCategory( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Adds a JOIN clause to the query using the Category relation

useCategoryQuery( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Use the Category relation Category object

prune( ProductCategory $productCategory = null)

Exclude object from result

int
doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the product_category table.

int
delete( ConnectionInterface $con = null)

Performs a DELETE on the database, given a ChildProductCategory or Criteria object OR a primary key value.

recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

recentlyCreated( int $nbDays = 7)

Filter by the latest created

lastUpdatedFirst()

Order by update date desc

firstUpdatedFirst()

Order by update date asc

lastCreatedFirst()

Order by create date desc

firstCreatedFirst()

Order by create date asc

ChildProductCategoryQuery
orderByProductId($order = Criteria::ASC)

Order by the product_id column

ChildProductCategoryQuery
orderByCategoryId($order = Criteria::ASC)

Order by the category_id column

ChildProductCategoryQuery
orderByDefaultCategory($order = Criteria::ASC)

Order by the default_category column

ChildProductCategoryQuery
orderByPosition($order = Criteria::ASC)

Order by the position column

ChildProductCategoryQuery
orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

ChildProductCategoryQuery
orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

ChildProductCategoryQuery
groupByProductId()

Group by the product_id column

ChildProductCategoryQuery
groupByCategoryId()

Group by the category_id column

ChildProductCategoryQuery
groupByDefaultCategory()

Group by the default_category column

ChildProductCategoryQuery
groupByPosition()

Group by the position column

ChildProductCategoryQuery
groupByCreatedAt()

Group by the created_at column

ChildProductCategoryQuery
groupByUpdatedAt()

Group by the updated_at column

ChildProductCategoryQuery
leftJoin($relation)

Adds a LEFT JOIN clause to the query

ChildProductCategoryQuery
rightJoin($relation)

Adds a RIGHT JOIN clause to the query

ChildProductCategoryQuery
innerJoin($relation)

Adds a INNER JOIN clause to the query

ChildProductCategoryQuery
leftJoinProduct($relationAlias = null)

Adds a LEFT JOIN clause to the query using the Product relation

ChildProductCategoryQuery
rightJoinProduct($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the Product relation

ChildProductCategoryQuery
innerJoinProduct($relationAlias = null)

Adds a INNER JOIN clause to the query using the Product relation

ChildProductCategoryQuery
leftJoinCategory($relationAlias = null)

Adds a LEFT JOIN clause to the query using the Category relation

ChildProductCategoryQuery
rightJoinCategory($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the Category relation

ChildProductCategoryQuery
innerJoinCategory($relationAlias = null)

Adds a INNER JOIN clause to the query using the Category relation

ChildProductCategory
findOne( ConnectionInterface $con = null)

Return the first ChildProductCategory matching the query

ChildProductCategory
findOneOrCreate( ConnectionInterface $con = null)

Return the first ChildProductCategory matching the query, or a new ChildProductCategory object populated from the query conditions when no match is found

ChildProductCategory
findOneByProductId( int $product_id)

Return the first ChildProductCategory filtered by the product_id column

ChildProductCategory
findOneByCategoryId( int $category_id)

Return the first ChildProductCategory filtered by the category_id column

ChildProductCategory
findOneByDefaultCategory( boolean $default_category)

Return the first ChildProductCategory filtered by the default_category column

ChildProductCategory
findOneByPosition( int $position)

Return the first ChildProductCategory filtered by the position column

ChildProductCategory
findOneByCreatedAt( string $created_at)

Return the first ChildProductCategory filtered by the created_at column

ChildProductCategory
findOneByUpdatedAt( string $updated_at)

Return the first ChildProductCategory filtered by the updated_at column

array
findByProductId( int $product_id)

Return ChildProductCategory objects filtered by the product_id column

array
findByCategoryId( int $category_id)

Return ChildProductCategory objects filtered by the category_id column

array
findByDefaultCategory( boolean $default_category)

Return ChildProductCategory objects filtered by the default_category column

array
findByPosition( int $position)

Return ChildProductCategory objects filtered by the position column

array
findByCreatedAt( string $created_at)

Return ChildProductCategory objects filtered by the created_at column

array
findByUpdatedAt( string $updated_at)

Return ChildProductCategory objects filtered by the updated_at column

Details

at line 78
__construct( string $dbName = 'thelia', string $modelName = '\\Thelia\\Model\\ProductCategory', string $modelAlias = null)

Initializes internal state of \Thelia\Model\Base\ProductCategoryQuery object.

Parameters

string $dbName The database name
string $modelName The phpName of a model, e.g. 'Book'
string $modelAlias The alias for the model in this query, e.g. 'b'

at line 91
static ProductCategoryQuery create( string $modelAlias = null, Criteria $criteria = null)

Returns a new ChildProductCategoryQuery object.

Parameters

string $modelAlias The alias of a model in the query
Criteria $criteria Optional Criteria to build the query from

Return Value

ProductCategoryQuery

at line 121
ProductCategory|array|mixed findPk($key, $con = null)

Find object by primary key.

Propel uses the instance pool to skip the database if the object exists. Go fast if the query is untouched.

$obj = $c->findPk(array(12, 34), $con);

Parameters

$key
$con

Return Value

ProductCategory|array|mixed the result, formatted by the current formatter

at line 204
ObjectCollection|array|mixed findPks( array $keys, ConnectionInterface $con = null)

Find objects by primary key $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con);

Parameters

array $keys Primary keys to use for the query
ConnectionInterface $con an optional connection object

Return Value

ObjectCollection|array|mixed the list of results, formatted by the current formatter

at line 225
ProductCategoryQuery filterByPrimaryKey( mixed $key)

Filter the query by primary key

Parameters

mixed $key Primary key to use for the query

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 240
ProductCategoryQuery filterByPrimaryKeys( array $keys)

Filter the query by a list of primary keys

Parameters

array $keys The list of primary key to use for the query

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 275
ProductCategoryQuery filterByProductId( mixed $productId = null, string $comparison = null)

Filter the query on the product_id column

Example usage: $query->filterByProductId(1234); // WHERE productid = 1234 $query->filterByProductId(array(12, 34)); // WHERE productid IN (12, 34) $query->filterByProductId(array('min' => 12)); // WHERE product_id > 12

Parameters

mixed $productId The value to use as filter. Use scalar values for equality. Use array values for in_array() equivalent. Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

See also

filterByProduct()

at line 318
ProductCategoryQuery filterByCategoryId( mixed $categoryId = null, string $comparison = null)

Filter the query on the category_id column

Example usage: $query->filterByCategoryId(1234); // WHERE categoryid = 1234 $query->filterByCategoryId(array(12, 34)); // WHERE categoryid IN (12, 34) $query->filterByCategoryId(array('min' => 12)); // WHERE category_id > 12

Parameters

mixed $categoryId The value to use as filter. Use scalar values for equality. Use array values for in_array() equivalent. Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

See also

filterByCategory()

at line 359
ProductCategoryQuery filterByDefaultCategory( boolean|string $defaultCategory = null, string $comparison = null)

Filter the query on the default_category column

Example usage: $query->filterByDefaultCategory(true); // WHERE defaultcategory = true $query->filterByDefaultCategory('yes'); // WHERE defaultcategory = true

Parameters

boolean|string $defaultCategory The value to use as filter. Non-boolean arguments are converted using the following rules: * 1, '1', 'true', 'on', and 'yes' are converted to boolean true * 0, '0', 'false', 'off', and 'no' are converted to boolean false Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 386
ProductCategoryQuery filterByPosition( mixed $position = null, string $comparison = null)

Filter the query on the position column

Example usage: $query->filterByPosition(1234); // WHERE position = 1234 $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34) $query->filterByPosition(array('min' => 12)); // WHERE position > 12

Parameters

mixed $position The value to use as filter. Use scalar values for equality. Use array values for in_array() equivalent. Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 429
ProductCategoryQuery filterByCreatedAt( mixed $createdAt = null, string $comparison = null)

Filter the query on the created_at column

Example usage: $query->filterByCreatedAt('2011-03-14'); // WHERE createdat = '2011-03-14' $query->filterByCreatedAt('now'); // WHERE createdat = '2011-03-14' $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13'

Parameters

mixed $createdAt The value to use as filter. Values can be integers (unix timestamps), DateTime objects, or strings. Empty strings are treated as NULL. Use scalar values for equality. Use array values for in_array() equivalent. Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 472
ProductCategoryQuery filterByUpdatedAt( mixed $updatedAt = null, string $comparison = null)

Filter the query on the updated_at column

Example usage: $query->filterByUpdatedAt('2011-03-14'); // WHERE updatedat = '2011-03-14' $query->filterByUpdatedAt('now'); // WHERE updatedat = '2011-03-14' $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13'

Parameters

mixed $updatedAt The value to use as filter. Values can be integers (unix timestamps), DateTime objects, or strings. Empty strings are treated as NULL. Use scalar values for equality. Use array values for in_array() equivalent. Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 503
ProductCategoryQuery filterByProduct( Product|ObjectCollection $product, string $comparison = null)

Filter the query by a related \Thelia\Model\Product object

Parameters

Product|ObjectCollection $product The related object(s) to use as filter
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 528
ProductCategoryQuery joinProduct( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Adds a JOIN clause to the query using the Product relation

Parameters

string $relationAlias optional alias for the relation
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 563
ProductQuery useProductQuery( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Use the Product relation Product object

Parameters

string $relationAlias optional alias for the relation, to be used as main alias in the secondary query
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ProductQuery A secondary query class using the current class as primary query

See also

useQuery()

at line 578
ProductCategoryQuery filterByCategory( Category|ObjectCollection $category, string $comparison = null)

Filter the query by a related \Thelia\Model\Category object

Parameters

Category|ObjectCollection $category The related object(s) to use as filter
string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 603
ProductCategoryQuery joinCategory( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Adds a JOIN clause to the query using the Category relation

Parameters

string $relationAlias optional alias for the relation
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 638
CategoryQuery useCategoryQuery( string $relationAlias = null, string $joinType = Criteria::INNER_JOIN)

Use the Category relation Category object

Parameters

string $relationAlias optional alias for the relation, to be used as main alias in the secondary query
string $joinType Accepted values are null, 'left join', 'right join', 'inner join'

Return Value

CategoryQuery A secondary query class using the current class as primary query

See also

useQuery()

at line 652
ProductCategoryQuery prune( ProductCategory $productCategory = null)

Exclude object from result

Parameters

ProductCategory $productCategory Object to remove from the list of results

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 669
int doDeleteAll( ConnectionInterface $con = null)

Deletes all rows from the product_category table.

Parameters

ConnectionInterface $con the connection to use

Return Value

int The number of affected rows (if supported by underlying database driver).

at line 706
int delete( ConnectionInterface $con = null)

Performs a DELETE on the database, given a ChildProductCategory or Criteria object OR a primary key value.

Parameters

ConnectionInterface $con

Return Value

int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows if supported by native driver or if emulated using Propel.

Exceptions

PropelException Any exceptions caught during processing will be rethrown wrapped into a PropelException.

at line 747
ProductCategoryQuery recentlyUpdated( int $nbDays = 7)

Filter by the latest updated

Parameters

int $nbDays Maximum age of the latest update in days

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 759
ProductCategoryQuery recentlyCreated( int $nbDays = 7)

Filter by the latest created

Parameters

int $nbDays Maximum age of in days

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 769
ProductCategoryQuery lastUpdatedFirst()

Order by update date desc

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 779
ProductCategoryQuery firstUpdatedFirst()

Order by update date asc

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 789
ProductCategoryQuery lastCreatedFirst()

Order by create date desc

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 799
ProductCategoryQuery firstCreatedFirst()

Order by create date asc

Return Value

ProductCategoryQuery The current query, for fluid interface

at line 68
ChildProductCategoryQuery orderByProductId($order = Criteria::ASC)

Order by the product_id column

Parameters

$order

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery orderByCategoryId($order = Criteria::ASC)

Order by the category_id column

Parameters

$order

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery orderByDefaultCategory($order = Criteria::ASC)

Order by the default_category column

Parameters

$order

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery orderByPosition($order = Criteria::ASC)

Order by the position column

Parameters

$order

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery orderByCreatedAt($order = Criteria::ASC)

Order by the created_at column

Parameters

$order

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery orderByUpdatedAt($order = Criteria::ASC)

Order by the updated_at column

Parameters

$order

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery groupByProductId()

Group by the product_id column

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery groupByCategoryId()

Group by the category_id column

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery groupByDefaultCategory()

Group by the default_category column

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery groupByPosition()

Group by the position column

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery groupByCreatedAt()

Group by the created_at column

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery groupByUpdatedAt()

Group by the updated_at column

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery leftJoin($relation)

Adds a LEFT JOIN clause to the query

Parameters

$relation

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery rightJoin($relation)

Adds a RIGHT JOIN clause to the query

Parameters

$relation

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery innerJoin($relation)

Adds a INNER JOIN clause to the query

Parameters

$relation

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery leftJoinProduct($relationAlias = null)

Adds a LEFT JOIN clause to the query using the Product relation

Parameters

$relationAlias

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery rightJoinProduct($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the Product relation

Parameters

$relationAlias

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery innerJoinProduct($relationAlias = null)

Adds a INNER JOIN clause to the query using the Product relation

Parameters

$relationAlias

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery leftJoinCategory($relationAlias = null)

Adds a LEFT JOIN clause to the query using the Category relation

Parameters

$relationAlias

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery rightJoinCategory($relationAlias = null)

Adds a RIGHT JOIN clause to the query using the Category relation

Parameters

$relationAlias

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategoryQuery innerJoinCategory($relationAlias = null)

Adds a INNER JOIN clause to the query using the Category relation

Parameters

$relationAlias

Return Value

ChildProductCategoryQuery

at line 68
ChildProductCategory findOne( ConnectionInterface $con = null)

Return the first ChildProductCategory matching the query

Parameters

ConnectionInterface $con

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneOrCreate( ConnectionInterface $con = null)

Return the first ChildProductCategory matching the query, or a new ChildProductCategory object populated from the query conditions when no match is found

Parameters

ConnectionInterface $con

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneByProductId( int $product_id)

Return the first ChildProductCategory filtered by the product_id column

Parameters

int $product_id

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneByCategoryId( int $category_id)

Return the first ChildProductCategory filtered by the category_id column

Parameters

int $category_id

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneByDefaultCategory( boolean $default_category)

Return the first ChildProductCategory filtered by the default_category column

Parameters

boolean $default_category

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneByPosition( int $position)

Return the first ChildProductCategory filtered by the position column

Parameters

int $position

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneByCreatedAt( string $created_at)

Return the first ChildProductCategory filtered by the created_at column

Parameters

string $created_at

Return Value

ChildProductCategory

at line 68
ChildProductCategory findOneByUpdatedAt( string $updated_at)

Return the first ChildProductCategory filtered by the updated_at column

Parameters

string $updated_at

Return Value

ChildProductCategory

at line 68
array findByProductId( int $product_id)

Return ChildProductCategory objects filtered by the product_id column

Parameters

int $product_id

Return Value

array

at line 68
array findByCategoryId( int $category_id)

Return ChildProductCategory objects filtered by the category_id column

Parameters

int $category_id

Return Value

array

at line 68
array findByDefaultCategory( boolean $default_category)

Return ChildProductCategory objects filtered by the default_category column

Parameters

boolean $default_category

Return Value

array

at line 68
array findByPosition( int $position)

Return ChildProductCategory objects filtered by the position column

Parameters

int $position

Return Value

array

at line 68
array findByCreatedAt( string $created_at)

Return ChildProductCategory objects filtered by the created_at column

Parameters

string $created_at

Return Value

array

at line 68
array findByUpdatedAt( string $updated_at)

Return ChildProductCategory objects filtered by the updated_at column

Parameters

string $updated_at

Return Value

array