on
method should affect only the Model
instance
#726
Labels
bug
An existing feature is not working as intended
on
method should affect only the Model
instance
#726
Describe the bug
In the
Model
class we have theon
method defined both in the__passthrough__
list and a class method:orm/src/masoniteorm/models/Model.py
Line 183 in 0ed9584
orm/src/masoniteorm/models/Model.py
Lines 1008 to 1011 in 0ed9584
Given this fact, it seems that the classmethod is always called, see the following example:
Expected behavior
The class attribute
__connection__
should not be changed.I think the correct behaviour should be to passthrough the
on
method towards theQueryBuilder
instance, so removing the class method or using another name for it (e.g.:global_on
).The text was updated successfully, but these errors were encountered: