init(for:identifier:)
Creates an EntityIdentifier representing an instance of the specified entity type backed by the specified identifier value.
Declaration
init<Entity>(for entityType: Entity.Type, identifier: Entity.ID) where Entity : AppEntityParameters
- entityType:
The type of the entity
- identifier:
The identifier value for the entity
Discussion
For entity types adopting SyncableEntity, this initializer extracts the stable ID:
Passthrough case: If the ID is already stable (like UUID), it’s used as both local and stable ID
Mapped case: If the ID uses SyncableEntityIdentifier, the stable ID is extracted from the wrapper