Function: resolveCollectionName()
resolveCollectionName(
clazz):string
Defined in: service-core/src/database/NamingUtils.ts:39
Resolves the name of the database collection (or table) that records of the given model class are stored in.
The name is resolved using the following rules:
- The nearest class in the inheritance chain (starting with
clazzitself) that specifies an explicit entity name via the@Entity(options)decorator. - Otherwise, the most ancestral class in the inheritance chain that declares its own
@DataStorebinding. This ensures that@ChildEntitysubclasses are stored in the same collection as their parent entity (single collection inheritance). - Otherwise, the snake_case form of the class name.
Parameters
clazz
any
The model class to resolve the collection name for.
Returns
string