43 if (!isset($this->property_type)) {
45 $this->property_type =
'attribute';
47 $this->property_type =
'metadata';
51 switch ($this->property_type) {
53 $md_alias = $qb->
joinMetadataTable($table_alias,
'guid', $this->property, $this->join_type);
59 throw new \InvalidParameterException(
"'$this->property' is not a valid entity attribute");
61 $column =
"$table_alias.$this->property";
64 case 'private_setting' :
70 $an_alias = $qb->
joinAnnotationTable($table_alias,
'guid', $this->property, $this->join_type);
75 throw new \InvalidParameterException(
"'$this->property_type' is not a valid entity property type");
79 $column =
"CAST($column AS SIGNED)";
84 return parent::prepare($qb, $table_alias);
prepare(QueryBuilder $qb, $table_alias=null)
{Build an expression and/or apply it to an instance of query builder.Query builder Table aliasComposi...
Database abstraction query builder.
Extends QueryBuilder with clauses necesary to sort entity lists by entity properties.
static $primary_attr_names
joinAnnotationTable($from_alias= '', $from_column= 'guid', $name=null, $join_type= 'inner', $joined_alias=null)
Join annotations table from alias and return joined table alias.
Extends QueryBuilder with ORDER BY clauses.
joinPrivateSettingsTable($from_alias= '', $from_column= 'guid', $name=null, $join_type= 'inner', $joined_alias=null)
Join private settings table from alias and return joined table alias.
joinMetadataTable($from_alias= '', $from_column= 'guid', $name=null, $join_type= 'inner', $joined_alias=null)
Join metadata table from alias and return joined table alias.