Pass values into DedupeRule->sql() rather than hybrid object #29520
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.
Overview
Pass values into DedupeRule->sql() rather than hybrid object
Before
Most of the properties accessed from
sql()
are straight from the db find but it also passes a couple of other properties by setting them on the classAfter
This fixes so the values the function needs are clearly passed in
Technical Details
It doesn't really make sense for this query calculation function to be on a different class I kinda get what they were thinking but the way our BAOs are half a collection of static functions but occassionally get serious about being an object but then like extra properties set without explanation does us no favours. In this case it would be most sane if all the query calculation was on the same class (probably a new one but for now just looking at one of the existing ones). To do that we need to get clearer about the input the sql() function needs - this switches it most of the way to being static-ready & move-ready by passing in the values as arrays rather than setting them as properties
Comments