- Issue created by @mlncn
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
Actually the best solution would be to use https://www.drupal.org/project/entity_reference_revisions โ and then we would be saving the revision ID instead of the entity ID.
So long as that is smart enough not to change the revision ID if nothing changes (doubtful?)
And provided it works with Address module.
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
Above commit appears to work perfectly (for the narrow and i think our only current use case of addresses); i just had thought i'd made the revision an official source when i had not. If we have any other inline entity references it should be pretty easy to expand that approach.
Well, with one more caveatโ we are checking only one field on the address entity,
field_address
. (That one field happens to have like 14 parts, of which we currently check about half for the value hash, but it could be made all easily.) The present client actually adds another field, for the type of address (mailing, physical etc). I am willfully ignoring that in the value hash as not important enough to affect which revision the address is attributed to. But most inline entities will probably be made up of several relevant fields which would entail a different, and certainly more annoying, strategy for calculating value hashes.