Hi,
How do I add predefined values for entities when a new tenant is created?
Thanks
4 Answer(s)
-
0
Hi @Ojala7
Could you provide a bit more detail about what you want ? Do you want to create specific entities when a tenant is created or do you want to assign a default value to an entity field ?
-
0
Hi, I want to create an entity which a field status. The field status has to be an entity on its own right. The values in status would be, by default draft, pending, final. I have noticed when a new tenant is created the status values are empty for the newly created tenant. I want these values to be draft, pending, final. What's more the status must be multi lingual
-
0
Hi,
For this case, I think you can create status field as
enum
and set its default value in the constructor of the entity. For more complex cases, I suggest you to create a doman service, create main entity and related entity in this class and set the relation. -
0
Thanks