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
The updateEntities function is specifically designed to manage class-based entity stores also. It ensures that any entities updated are always instances of the appropriate class, by checking against both the previous and next object classes in the entity sequence (for more details, see this comment).
On the other hand, EntityStore.upsertMany employs a different update logic which does not automatically handle the class of the previous and next entities unless a class reference is explicitly provided in the options object. Notably, the paginator plugin relies on upsertMany to load new pages and does not offer the option to specify a class reference. This oversight leads to a conversion from class objects to plain objects when existing pages are reloaded, potentially causing data integrity issues.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes
The text was updated successfully, but these errors were encountered:
ZeevKatz
changed the title
upsertMany does not handle class based entity storeupsertMany does not function correctly in class-based entity stores
Apr 16, 2024
Is this a regression?
No
Description
The
updateEntities
function is specifically designed to manage class-based entity stores also. It ensures that any entities updated are always instances of the appropriate class, by checking against both the previous and next object classes in the entity sequence (for more details, see this comment).On the other hand,
EntityStore.upsertMany
employs a different update logic which does not automatically handle the class of the previous and next entities unless a class reference is explicitly provided in the options object. Notably, the paginator plugin relies onupsertMany
to load new pages and does not offer the option to specify a class reference. This oversight leads to a conversion from class objects to plain objects when existing pages are reloaded, potentially causing data integrity issues.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
Yes
The text was updated successfully, but these errors were encountered: