Conversation
The has operator (^$) on a property that is not a collection threw the message of the does-not-have operator: "DoesNotHaveType is only supported for collections". Throw "HasType is only supported for collections" instead. BREAKING CHANGE: the message of the QueryKitParsingException for has (^$) on a property that is not a collection changes from "DoesNotHaveType is only supported for collections" to "HasType is only supported for collections". Code that matches the old message text must match the new text.
pdevito3
force-pushed
the
fm/qk-breaking-has-message
branch
from
October 1, 2026 21:49
9eb6bc8 to
1dd0e11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For later consideration in a major version. Do not merge now. #134 restored the v1.14.2 message to keep v1.x compatible (restore commit
22798f0). This PR re-applies the message ofde350f7(#109). The captain decides on this PR separately.Summary
The change is in
HasTypeinQueryKit/Operators/ComparisonOperator.csonly. The exception type does not change.v1.14.2 behavior (and main)
The has operator (
^$) on a property that is not a collection throwsQueryKitParsingExceptionwith the message "DoesNotHaveType is only supported for collections". The message names the wrong operator.New behavior
The same exception has the message "HasType is only supported for collections". The does-not-have operator (
!^$) keeps its message "DoesNotHaveType is only supported for collections".Example
QueryKitParsingException: DoesNotHaveType is only supported for collections.QueryKitParsingException: HasType is only supported for collections.Justification
The message must name the operator that failed. The old message sends the user to the wrong operator.
Migration
If your code or your tests match the message text, change "DoesNotHaveType is only supported for collections" to "HasType is only supported for collections" for the has operator. Code that catches
QueryKitParsingExceptionby type does not change.README
No change. The README does not document this message.
Tests
Unit
FilterParserTests.has_type_on_non_collection_property_throws_the_v1_14_2_messagebecomeshas_type_throws_correct_message_on_non_collection_propertyagain, from main before #134. The expected message is "HasType is only supported for collections". No integration test changes.dotnet test: 470 unit tests and 297 Postgres integration tests (Testcontainers) pass, 0 failures.Rebase on main
This branch is rebased on current main (#169). The rebase had no conflicts. The breaking change did not change.