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
Performance:
ProductRepository#getLabels loads Labels from database ( if no updates found) and LoadTaxonomiesService#doTask will reimport it in database. It's useless. Samething for other taxonomies ( tags, allergens,...)
Refresh data:
if a taxonomy should be updated from the database, the idea is to delete all local data first and reimport all data in the same transaction.
Modification:
Some new method shoud be added to IProductRepository in order to perform this actions.
add new methods in IProductRepository.
IProductRepository.loadLabels that will call the api if required. If not required, it will return a null value
IProductRepository.replaceLabels that will delete labels before adding all labels ( if the new labels are not null)
Maybe it will be better to avoid using null to indicate that nothing should be done
This discussion was converted from issue #2905 on May 08, 2021 13:14.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Performance:
ProductRepository#getLabels loads Labels from database ( if no updates found) and LoadTaxonomiesService#doTask will reimport it in database. It's useless. Samething for other taxonomies ( tags, allergens,...)
Refresh data:
if a taxonomy should be updated from the database, the idea is to delete all local data first and reimport all data in the same transaction.
Modification:
Some new method shoud be added to IProductRepository in order to perform this actions.
add new methods in IProductRepository.
Maybe it will be better to avoid using null to indicate that nothing should be done
Beta Was this translation helpful? Give feedback.
All reactions