Optional init: Partial<BaseEnginePropertyConfig>Optional AddOptional, whether to add the result to the object, defaults to true if not specified
Optional AutoOptional, defaults to true. If set to false, AutoRefresh for this item will be disabled. By default, whenever a BaseEntity event is emitted for a save/delete, if the entity name for this config matches the BaseEntity's entity name, the config will be refreshed. If this is set to false, that will not happen. NOTE: This is not a network notification mechanism, it only works within the local tier, so for example within a browser application, that brower's engine sub-classes will be updated when changes are made to entities in that application environment, and the same is true for MJAPI/Server based environments. If you need network based notification, additional infrastructure will be needed to implement that.
Optional CacheWhen set to true, the engine will use the LocalCacheManager to cache results locally. On subsequent loads (unless forceRefresh is true), cached results will be returned immediately without hitting the server if they are still valid.
This is useful for frequently-accessed, relatively-static data that doesn't need real-time freshness. The cache is automatically invalidated when entity data changes.
false
Optional CacheOptional TTL (time-to-live) in milliseconds for locally cached results when CacheLocal is true. After this time, cached results will be considered stale and fresh data will be fetched. If not specified, the LocalCacheManager's default TTL will be used (typically 5 minutes).
Optional DatasetOptional, filters to apply to each item in a dataset, only applies when type is 'dataset' and is optional in those cases.
Optional DatasetThe dataset name to load from the database, required if Type is 'dataset'
Optional DatasetOptional, only used if Type is 'dataset', specifies how to handle the results of the dataset load. Defaults to 'single_property' if not specified. When set to 'single_property', the entire dataset is set to the property specified by PropertyName. When set to 'individual_properties', each item in the dataset is set to a property on the object with the name of the item's key plus the item's Code name. For example, if the item's key is 'Demo' and the item's Code name is 'FirstItem', the property set on the object would be 'Demo_FirstItem'.
Optional DebounceOptional debounce time in milliseconds for this specific config. If not specified, uses the engine's default EntityEventDebounceTime (5000ms). This allows different entities to have different debounce delays.
Optional EntityThe entity name to load from the database, required if Type is 'entity'
Optional ExpirationOptional, expiration time in milliseconds
Optional FilterOptional, filters to apply to the data load, applies only when type is 'entity'. Use DatasetItemFilters for dataset filters.
Primary Key
Optional OrderOptional, order by clause to apply to the data load, only applies when type is 'entity'
The name of the property in the class instance
The type of item to load, either 'entity' or 'dataset', defaults to 'entity'
Protected copyCopies initialization data from a plain object to the class instance. Only copies properties that already exist on the class to prevent creating new fields. Special handling for DefaultValue fields to extract actual values from SQL Server syntax.
The initialization data object
Property configuration for the BaseEngine class to automatically load/set properties on the class.