Comments

Kakarotu created an issue. See original summary.

Kakarotu’s picture

Add field changed to vote entity

tr’s picture

Version: 8.x-3.0-beta2 » 8.x-3.x-dev
Status: Active » Needs work

Don't you need to implement EntityChangedInterface ?

Also, you definitely need a hook_update_N() if you propose to change the entity fields.

Kakarotu’s picture

Thanks for response.
I implemented the EntityChangedInterface and there's hook_update_N (votingapi_update_8305), I added a code to loop over vote entities and set changed as created.

tr’s picture

You should do the updates in a batch, otherwise this will cause problems similar to #3068504: Update hook exhausts resources

Kakarotu’s picture

Kakarotu’s picture

Fix patch warning and hook_update_N (numbers).

tr’s picture

Version: 8.x-3.x-dev » 4.0.x-dev

Needs a re-roll and a test of the update function. This needs to go into 4.0.x, and won't be backported.