Using relation table name in joinWith

Hello.

Is there a way to use table name of relational model, defined in model class, in joinWith?

For example, from documentation:




$orders = Order::find()->innerJoinWith([

    'books',

    'customer' => function ($query) {

        $query->where('customer.created_at > ' . (time() - 24 * 3600));

    }

])->all();



Here customer is relational table name, but if Customer model has redefined tableName:




class Customer extends ActiveRecord

{

    public static function tableName()

    {

        return 'cstmr';

    }

}



we need to write where condition like this:




$query->where('cstmr.created_at > ' . (time() - 24 * 3600));



Maybe there is some special macros, which is automatically replacing with table name? Something like this:




$query->where('%tableName%.created_at > ' . (time() - 24 * 3600));



Of course, I can use tableName() method:




$query->where(Customer::tableName() . '.created_at > ' . (time() - 24 * 3600));



But why not to add some automatic replacing here?

Maybe AR can resolve table name by relation name in such cases:




$orders = Order::find()->innerJoinWith([

    'books',

    'customer' => function ($query) {

        $query->where('customer.created_at > ' . (time() - 24 * 3600)); // Automatically replace customer with Customer::tableName() here

    }

])->all();



?