-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A bug report about $lt
selector on primaryKey on RxStorageDexie
#4751
Conversation
const myDocuments = await collectionInOtherTab.mycollection | ||
.find({ | ||
selector: { | ||
passportId: { $lt: '002' }, | ||
}, | ||
}) | ||
.exec(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
myDocuments
should have only alice's passport because we have a selector passportId: { $lt: '002' }
.
assert.deepStrictEqual( | ||
myDocuments.map((doc) => doc.toJSON()), | ||
[ | ||
{ | ||
passportId: '001', | ||
firstName: 'Alice', | ||
lastName: 'Kelso', | ||
age: 56, | ||
}, | ||
] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm run test:browser:dexie
says
bug-report.test.js
✗ should fail because it reproduces the bug
Expected values to be strictly deep-equal:
+ actual - expected
[ { passportId: '001',
firstName: 'Alice',
lastName: 'Kelso',
+ age: 56 },
+ { passportId: '002',
+ firstName: 'Bob',
+ lastName: 'Kelso',
+ age: 45 } ]
- age: 56 } ]
@youxkei please rebase with master. This is likely already fixed. |
636e372
to
71b51f1
Compare
@pubkey Thank you for your work! I rebased it. |
Working on a fix in #4891 |
Fixed here #4891 |
This PR contains:
Describe the problem you have without this PR
There seems a bug for
$lt
selector on primaryKey on RxStorageDexie.