Protected_virtualProtected Static_fieldProtected Static_relationsProtected Static Optional_revisionProtected Static_viewsStaticdalStaticoptionsStaticschemaStatictableProtectedruntimeProtected StaticruntimeProtected_setDelete all revisions of this model instance This method will be dynamically assigned by revision handlers
User performing the deletion
Deletion options
Deletion revision
Generate virtual field values
Get property value (data or virtual)
Property name (camelCase or snake_case)
Property value
Persist this instance and synchronize any many-to-many relations.
⚠️ Only through relations whose join tables contain just
foreign keys are managed automatically. If the join table carries
additional editable columns (role flags, metadata, timestamps that
should be user-controlled, etc.), mutate that table directly instead
of relying on saveAll, because the DAL currently treats
relation membership as an ID-only diff.
Optional map of relation names to include.
When omitted, every declared through relation is synchronized.
This instance
Set property value
Property name (camelCase or snake_case)
Property value
Static_ensureEnsure a revision handler is available for this model runtime
Revision handler to initialize
Revision handler function
Static_getGet the database field name for a given property name
Property name (camelCase or snake_case)
Database field name (snake_case)
Static_registerRegister a camelCase to snake_case field mapping
camelCase property name
snake_case database column name
StaticaddBatch-insert associations into a many-to-many junction table.
This helper creates associations between a single source record and multiple target records by inserting rows into a junction table. It automatically handles:
Name of the relation defined in the manifest (must have a through junction table)
ID of the source record to associate from
Array of target record IDs to associate with
Optionaloptions: { onConflict?: "error" | "ignore" }Optional configuration
OptionalonConflict?: "error" | "ignore"How to handle duplicate associations: 'ignore' (default) or 'error'
StaticbetweenCreate query builder with date range filter
Start date
End date
Options for the range
Query builder
StaticcontainsCreate query builder with array contains filter
Field name
Value to check for
Query builder
StaticcreateCreate a new record
Record data
Creation options
Created model instance
StaticcreateCreate a new model class
Database table name
Model schema definition
Model options
DAL instance
Model constructor
StaticdefineDefine an instance method on the model
Method name
Method function
StaticdefineRegister relation metadata for the model
Relation name
Relation configuration
StaticdefineRegister a named projection/view for this model.
Unique view identifier
View configuration
StaticdeleteDelete a record by ID
Record ID
Success status
StaticfetchExecute a view query using the provided builder configuration.
Registered view name
View fetch options
Array of projected view objects
StaticgetGet a record by ID
Record ID
Query options
Array of sensitive field names to include
Model instance
StaticgetGet multiple records by IDs
Record IDs
Array of model instances
StaticgetGet list of database column names including specified sensitive fields
Array of sensitive field names to include
Array of database column names
StaticgetCreate query builder with joins
Join specification
Query builder
StaticgetGet multiple records by IDs, excluding stale and deleted revisions
Record IDs
Query builder for chaining
StaticgetRetrieve relation metadata by name
Relation name
Stored relation configuration
StaticgetRetrieve all registered relation metadata
Array of relation configurations with names
StaticgetGet list of non-sensitive database column names for safe querying Excludes fields marked as sensitive and virtual fields
Array of database column names
StaticgetGet list of sensitive field names in the schema
Array of field names (camelCase)
StaticgetRetrieve the view definition for a registered projection.
View identifier
Stored view definition or null if missing
StaticlimitCreate query builder with limit
Limit count
Query builder
StaticloadBatch-load many-to-many related records through a junction table.
Given an array of source IDs, fetches all related records and groups them by source ID. Handles both direct and through (junction table) relations, automatically applying revision system guards when needed.
Name of the relation from the manifest
Array of source record IDs to load relations for
Map of source ID to array of related model instances
StaticorderCreate query builder for ordering
Field to order by
Sort direction (ASC/DESC)
Query builder
Staticupdate
Base Model class