You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modify the Customer class and added a guid field without modifying the primary key.
Then in ActiveRecordTest, save an instance of the CustomeryBinary and assign the guid to the binary form of "51a4e62e-1b1a-56c9-e9e5-9efe21f55276".
When testing the find() based on the guid value, it was found that the value was escaped in the buildHashCondition() method. The escaped result is inconsistent with the saved result.
If the primary key is a binary value, this error will not be occurred because the finding process does not go through the escaping. But if the primary key is a composite fields, which contains a binary field, this error will still be triggered.
What's expected?
Can use non-primary key binary values as query conditions.
What do you get instead?
If it is a binary value, it should not be escaped.
Additional info
Q
A
Yii vesion
2.0.0 or later
yii2-redis version
2.0.0 or later
PHP version
5.4 ~ 8.1
Operating system
All
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
https://github.com/vistart/yii2-redis/blob/master/tests/data/ar/CustomerBinary.php
https://github.com/vistart/yii2-redis/blob/master/tests/data/ar/CustomerBinaryQuery.php
I modify the Customer class and added a guid field without modifying the primary key.
Then in ActiveRecordTest, save an instance of the
CustomeryBinary
and assign the guid to the binary form of "51a4e62e-1b1a-56c9-e9e5-9efe21f55276".When testing the
find()
based on theguid
value, it was found that the value was escaped in thebuildHashCondition()
method. The escaped result is inconsistent with the saved result.The test results are as follows:
https://github.com/vistart/yii2-redis/runs/7493880767
All modifications are as follows:
master...vistart:yii2-redis:master
If the primary key is a binary value, this error will not be occurred because the finding process does not go through the escaping. But if the primary key is a composite fields, which contains a binary field, this error will still be triggered.
What's expected?
Can use non-primary key binary values as query conditions.
What do you get instead?
If it is a binary value, it should not be escaped.
Additional info
The text was updated successfully, but these errors were encountered: