protected function setSelection(xPDOQuery $c) { $c = parent::setSelection($c); if ($this->getProperty('includeTVs')) { $c->leftJoin('modTemplateVarResource', 'TemplateVarResources'); $c->leftJoin('modTemplateVar', 'tv', "tv.id=TemplateVarResources.tmplvarid"); $c->select(array("tv.id as tv_id", 'tv.name as tv_name', "TemplateVarResources.id as tv_value_id", "TemplateVarResources.value as tv_value")); } return $c; }
protected function setSelection(xPDOQuery $c) { $c = parent::setSelection($c); $c->select(array("Product.*", "Product.id as `product_id`")); return $c; }