When you have a Model MyModel any query executed with MyModel.query()... includes a FROM clause to MyModel.tableName (public.my_model, for example) by default. Is it possible to change/override that FROM for specific queries?
Is it possible to execute MyModel.query().fromRaw('public.my_custom_model(?)', foo)... somehow?
I know I could create another model for this but public.my_custom_model(?) has the same structure as public.my_model so everything I've implemented in MyModel (virtual columns, modifiers, hooks...) and every class extending MyModel will be valid for this new model too.
It would be more of a hassle to maintain everything if I need to have a new class just for this.