There is an extension for Yii2 I'm using, and it provides a database table and an ActiveRecord model class to work with entities in that table. My other models are generated with Giiant. I want to reference the library model from my generated models, e.g. so relation properties like $myEntity->thatLibraryEntity are generated correctly by Giiant. Is it possible to do so?
I haven't found a way to do so in the documentation, and in the source code the closest thing to what I want is setting the BatchController::$tableNameMap configuration parameter in Giiant, but that seems to only rename the models, and I would like to tell Giiant which existing ActiveRecord to use for entities in a particular table.
I worked around it.
The generated models reference class
app\models\ThatLibraryEntityfor tablethat_library_entity. I created that class, and made it extend the library ActiveRecord model I wanted to use.