[jpa] Support state filter when querying#19581
Conversation
Signed-off-by: Cody Cutrer <cody@cutrer.us>
Also, FilterCriteria.toString instead of custom implementations. They're only used for debug logging, so the exact format changing shouldn't matter. Signed-off-by: Cody Cutrer <cody@cutrer.us>
9242475 to
8ec8f3f
Compare
lsiepel
left a comment
There was a problem hiding this comment.
Needs spotless, otherwise LGTM
Signed-off-by: Cody Cutrer <cody@cutrer.us>
|
Hello all, This PR seems to have broke the dynamoDb unit test ? Laurent. |
|
The core changes now point to the Operator class: Looking at this PR again. It does not seem to match the implementation as it was for dynamodb: (especially NEQ) I think we need some override or custom replacement. Quick fix: filter.getOperator().getSymbol().replace("!=","<>") |
|
🤦 I don't know how I overlooked that. I properly handled the same case for InfluxDB. I'm also surprised and confused how the build passed for this PR at all. I know I ran the tests locally too, but I was able to reproduce with the tests immediately today. 🤷. Regardless, #19680 is the fix. |
No worries, thanks for the quick fix! |
|
Thanks for the fix @ccutrer. I think build chain is a little misunderstanding in this case. |
Depends on openhab/openhab-core#5106.
And since I'm using that, do some cleanup in all persistence services to use the newly-available Operator.getSymbol method when possible, as well as FilterCriteria.toString instead of custom implementations. They're used for debug logging, so the exact format changing shouldn't be important.