Reload entity from DB while in-flight?

Created on 16 July 2013, over 11 years ago
Updated 31 July 2024, 5 months ago

I'm using entities to represent the settings for a module, and some of the operations to refresh the settings with a third party OAUTH2 API are sensitive to race conditions. I plan to surround this with some locking, but currently the refresh behavior is located in a class method on the entity.

The problem with this is that even if a request waits due to the lock, I'm not sure how to force the entity to reload itself from the DB. In other frameworks, such as Rails, there is a reload method that can be used to update the values of a model from the DB without recreating the object. I don't know if this is possible with entity API now, but it would be great if could be added as a feature.

✨ Feature request
Status

Active

Version

1.1

Component

Code - misc

Created by

πŸ‡ΊπŸ‡ΈUnited States mikey_p Dayton, OH

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • First commit to issue fork.
Production build 0.71.5 2024