Skip to content
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

Use buffer as the rawResult key may destroy the merge function from rawData to entity randomly #4220

Closed
sevenryze opened this issue Jun 1, 2019 · 2 comments

Comments

@sevenryze
Copy link
Contributor

Issue type:

[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue

Database system/driver:

[ ] cordova
[ ] mongodb
[ ] mssql
[x] mysql / mariadb
[ ] oracle
[ ] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo

TypeORM version:

[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)

Steps to reproduce or a small repository showing the problem:

  1. Use the buffer as the db primary key.
  2. Load enough amount of entities from the db using query builder.
  3. The getRawMany() collection will bigger than getMany() collection, as the entities inside the getMany() result are merged by mistake, randomly.
  4. You could use getRawManyAndEntities() to get the results to comparing.

I think it might be related to #2370 (comment) .

I will provide a PR to fix this problem, but i need you @pleerock to review if this workaround is proper and DO not failed any cases i havn't recall.

@sevenryze
Copy link
Contributor Author

See PR #4221 , i already resolved this kind of issue.

@sevenryze
Copy link
Contributor Author

Closed as the PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant