It should be possible to find an entity solely based on its UUID, without needing to know the entity type. That's really the whole point of UUIDs. Users or callers shouldn't need to care what an entity's type is.
This would allow for things like:
- surfing to
/entity/UUIDvia #2353611: Make it possible to link to an entity by UUID and/or #1726734: Replace serial entity IDs with UUIDs in URLs, or even globally?, - calling
EntityRepository::loadEntityByUuid()without needing the$entity_type_idparameter, - etc.
A discussion on this topic was started at #1637370-55: Add UUID support to core entity types, with the idea of "adding a uuid lookup table to core in addition to the uuid column in the entity base table":
The global lookup table mapping UUID to entity (in addition to the entity specific column) would be analogous to the global url alias table. That becomes crucial if we change system urls to reference UUID instead of nid, uid, etc. If we do that, we might have to dereference URLs in a service like #1269742: Make path lookup code into a pluggable class.
Comments
Comment #2
amateescu commentedDuplicate of #2690747: [PLAN] Create an index of UUIDs :)
Comment #3
colanThanks! I wasn't aware of that one.