graph LR
Model["Model"]
Builder["Builder"]
Relation["Relation"]
SoftDeletes["SoftDeletes"]
SoftDeletingScope["SoftDeletingScope"]
Factory["Factory"]
Pivot["Pivot"]
Model -- "delegates operations to" --> Builder
Model -- "composes" --> Relation
Relation -- "uses" --> Builder
Relation -- "manages" --> Pivot
Builder -- "applies" --> SoftDeletingScope
SoftDeletes -- "extends" --> Model
SoftDeletes -- "influences queries of" --> Builder
SoftDeletingScope -- "is registered with" --> Model
Factory -- "creates instances of" --> Model
The ORM Core subsystem in Orator is the heart of its ActiveRecord implementation, providing the foundational components for object-relational mapping, data persistence, and business logic encapsulation.
The cornerstone of the ActiveRecord pattern, representing a single database record and encapsulating business logic. It provides an object-oriented interface for CRUD operations, attribute management, and lifecycle events. It serves as the primary interface for application logic to interact with the database.
Related Classes/Methods:
Implements the Query Builder pattern, providing a fluent API to construct complex database queries. It translates high-level ORM operations into executable database queries, abstracting the underlying SQL.
Related Classes/Methods:
Defines and manages the logic for various types of relationships between Model instances (e.g., one-to-one, one-to-many, many-to-many). This is fundamental for navigating and querying interconnected data within the ORM.
Related Classes/Methods:
A mixin providing soft deletion functionality to Model instances. It modifies the behavior of models to mark records as deleted rather than physically removing them from the database.
Related Classes/Methods:
Applies common query constraints for soft deletion. It automatically filters out soft-deleted records from queries unless explicitly requested, ensuring consistent data retrieval.
Related Classes/Methods:
Provides a structured mechanism for creating model instances, often used for seeding databases or generating test data. It abstracts the instantiation process, allowing for consistent and repeatable model creation.
Related Classes/Methods:
A specialized Model subclass that handles intermediate table data for many-to-many relationships. It represents the "pivot" table that links two related models.
Related Classes/Methods: