Currently working on a project with a few custom entities that needs to be deployable in addition to nodes ; those entities have a custom storage backend, and use ContentEntityStorageTrait; to get the various Multiversion helpers.
It almost work, except that buildQuery returns early and doesn't correctly handle deleted entties.
Right now, there's
// Prevent to modify the query before entity type updates.
if (strpos($this->entityType->getStorageClass(), 'Drupal\multiversion\Entity\Storage') === FALSE) {
return $query;
}
In ContentEntityStorageTrait, which prevents using the trait with any storage class that's not explicitely in the Multiversion namespace. It'd be very nice to improve that.
I think the easiest fix to get in would be to simply change that to check that the storage implements Multiversion ContentEntityStorageInterface.
Comments
Comment #2
DeFr commentedComment #4
jeqq commentedThanks @DeFr!