protected function getFullAssocData($attributes, $parent = 0)
{
$criteria = $this->getOwnerCriteria();
$attributes = $this->aliasAttributes(array_unique(array_merge($attributes, [$this->primaryKeyAttribute])));
$criteria->select = implode(', ', $attributes);
if (!$parent) {
$parent = $this->getOwner()->getPrimaryKey();
}
if ($parent) {
$criteria->compare($this->primaryKeyAttribute, array_merge([$parent], $this->getChildsArray($parent)));
}
$command = $this->createFindCommand($criteria);
$this->clearOwnerCriteria();
return $command->queryAll();
}