Adds a condition on an entity-specific property.
An $entity_type must be specified by calling EntityFieldCondition::entityCondition('entity_type', $entity_type) before executing the query. Also, by default only entities stored in SQL are supported; however, EntityFieldQuery::executeCallback can be set to handle different entity storage.
$column: A column defined in the hook_schema() of the base table of the entity.
$value: The value to test the field against. In most cases, this is a scalar. For more complex options, it is an array. The meaning of each element in the array is dependent on $operator.
$operator: Possible values:
The operator can be omitted, and will default to 'IN' if the value is an array, or to '=' otherwise.
EntityFieldQuery The called object.
public function propertyCondition($column, $value, $operator = NULL) {
// The '!=' operator is deprecated in favour of the '<>' operator since the
// latter is ANSI SQL compatible.
if ($operator == '!=') {
$operator = '<>';
}
$this->propertyConditions[] = array(
'column' => $column,
'value' => $value,
'operator' => $operator,
);
return $this;
}