You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It allows to identify entities with strategy of 'late identity assignment', before main identity is assigned.
It's VO-like equals. Especially useful in Sets.
@gt4dev No. It's because the tenantId and productId are a composite id, but not held as one. In a SaaS with multiple tenants all entities must be "striped" with the tenantId. They are separated so the tenant is clearly identified and can be queried on its own.
I know, it's just a sample but
as identity is top important in entities let me ask sth.
Generalizing IDDD sample code:
When I 1st time saw Thing with ThingId then I thought that ThingId is just id of thing [common sense]
But it's not (as ID needs TenantId)
From my PoV clearer would be [in saasovation context]
either create VO ThingId - which hides all inner elements: id of particular thing + all striping id-s [tenant, product ...] etc
or rename ThingId to sth like ThingRawId or ThingUnstripedId - to explicitly express in name that it's not real id
What do think you about it, especially point 1?
IMO with "1"
model [and code] is simpler
still you can do all searches for "things" by tenant etc. as is done in current IDDD sample
It's even more cleared when ID is more complex [like in eg BacklogItem where ID is build from 3 IDs].
Hi
Vaughn, could you explain it? I'd appreciate ;]
For example Product: uses ProductId and TentatId.
Entity is identified by its ID (ProductId) thus:
Thank you
GT
BTW. Great book. I'm reading it 2nd time ;]
The text was updated successfully, but these errors were encountered: