Referencing owner model in active record relation definition

I have this question regarding the active record that has been troubling me for so long and I’m going to ask it.

Is it possible to use the owner model’s alias in a relation? Like reference it as t or something and have it substituted with the actual model alias at the time the relation is referenced?




class Article extends CActiveRecord

{

	public function relations(): array

	{

		return array_replace(parent::relations(), [

			'tags' => [static::HAS_MANY, Tag::class, 'id', 'on' => 'tag.type=t.type'],

		]);

	}

}




Person::model()->findAll([

	'with' => [

		'articles' => [

			'alias' => 'person_articles',

			'with' => [

				'tags' => [

					'alias' => 'person_article_tags',

				],

			],

		],

	],

]);



Using


"tag.type={$this->tableAlias}.type"

or anything in these lines does not work…