fix: 实体模型调用静态方法时,支持识别对应模型的自定义静态方法,而不是写死几个方法 #817
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
原本实体模型的 __callStatic() 中是写死了对应模型的几个方法,只有这些方法支持对实体模型对应的模型调用,代码如下
在升级orm 4的过程中,有时候无法避免在传统模型中存在一些公共的静态方法,因此实体模型应该支持对应模型公共静态方法的调用,而不是固定写死几个内置的方法