0

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.

gvlasov
  • 18,638
  • 21
  • 74
  • 110

1 Answers1

0

I worked around it.

The generated models reference class app\models\ThatLibraryEntity for table that_library_entity. I created that class, and made it extend the library ActiveRecord model I wanted to use.

gvlasov
  • 18,638
  • 21
  • 74
  • 110