When using c3Context(myTenant, myTag, myFunc) what is the effect of having myTag = 'c3'?

#1

It seems to me like having a tag of ‘c3’ causes myFunc to be applied to all tags with a tenant of myTenant. Is this accurate? Are there any other side effects?

0 Likes

#2

Its not that the function gets applied to ALL tags in myTenant, its that the ‘c3’ tag kind of IS the tenant.

0 Likes

#3

Okay, so does that mean there are database records tied to the Tenant itself (ie records for TenantConfig)? Because for some entity types

c3Context(myTenant, 'c3', function () {
  FakeEntityType.create({});
})

will fail. How can you tell what types are tied to a Tenant and which ones are tied to a Tag? Or is that not really how the relation between a type and Tenant/Tag work?

0 Likes

#4

Thats correct. Only plaform types exist in the tenant. None of the types from a provisioned package exist in the tenant itself.

0 Likes

#5

Some types are facaded to the c3 tag. For example, TenantConfig (FYI deprecated) has this annotation:

@facade(tag='c3')

So all tags in a given tenant will share TenantConfig data because they are all facaded to the same tag (c3).

0 Likes