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

The updatedAt timestamp does not change for translatable entities when their translations are updated #1464

Closed
skid opened this issue Mar 8, 2022 · 5 comments · Fixed by #2630
Assignees
Labels

Comments

@skid
Copy link
Contributor

skid commented Mar 8, 2022

The updatedAt column of translatable entities (e.g. Product) does not change when their translations are updated - only the translation's updatedAt column does. The intuitive expectation would be: When I change a product's name, its updatedAt timestamp should change too.

@timcv
Copy link

timcv commented Jan 19, 2024

Hi @michaelbromley,

I want to sync product data to another system and it would make it easier if i could check if the products is updated since the last sync.

Do you have any idea about how to solve this issue or ay idea about how to make a workaround for this issue? If you have a if you have a rough idea of how to solve it, maybe we can help.

Thanks in advance

/Tim

@michaelbromley
Copy link
Member

Hi,

I think a solution would involve modifying the TranslatableSaver.update() method so that it manually sets the updatedAt field on the translation's parent entity and persists that to the DB.

A work-around that you could use for now though would be to define a custom field on the product which stores the last update time, and use the EventBus to subscribe to changes with the ProductEvent and use that to update your custom field.

@michaelbromley
Copy link
Member

/bounty $30

Copy link

algora-pbc bot commented Jan 19, 2024

💎 $30 bounty • Vendure

Steps to solve:

  1. Start working: Comment /attempt #1464 with your implementation plan
  2. Submit work: Create a pull request including /claim #1464 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to vendure-ecommerce/vendure!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @furo321 #2630

Copy link

algora-pbc bot commented Jan 19, 2024

💡 @furo321 submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@michaelbromley michaelbromley moved this from 📅 Planned to ✅ Done in Vendure OS Roadmap Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🚀 Shipped
Development

Successfully merging a pull request may close this issue.

3 participants