Core package documentation
The foundation of Small Swoole Entity Manager: entity metadata, managers, relational builders, scalar and statistical projections, persistence coordination, lifecycle hooks and database drivers. The current Core release is 3.3.1 and requires PHP 8.4+.
Understand the main components before configuring the ORM.
Chapter 1 Get startedInstall Core 3 and create a first manager and mapped entity.
Chapter 2 Entities and fieldsMap identifiers, scalar values, dates and custom field behavior.
Chapter 3 Relations and collectionsModel one-to-one, one-to-many and composite relation graphs.
Chapter 4 Entity query builderBuild relational reads with joins, filters and hydrated entity results.
Core 3 Scalar and statistics buildersProject selected fields, aliases and SQL aggregates into typed scalar result sets.
Chapter 5 Update builderApply targeted updates without hydrating complete entities.
Core 3.2 · Released Atomic upserts and idempotencyUse mapped entities with database-enforced conflict handling.
Core 3.2 · Upcoming Typed atomic expressionsPerform safe increments, UTC lease calculations and conditional metrics.
Core 3.3 · Released Scoped ORM sessions and typed criteriaUse ORM-owned transactions, row locking, mapped writes, CAS and explicit retry policies.
Chapter 6 Delete builderDelete rows with explicit filters and controlled query construction.
Chapter 7 Validation integrationKeep input validation outside the Core 3 persistence layer.
Chapter 8 Database layersTrack schema evolution and execute generated database changes.
Chapter 9 Transactions and persistence threadsCoordinate atomic work and concurrent persistence operations.
Chapter 10 Backups and change detectionDetect modified state and protect persistence workflows.
Chapter 11 Lifecycle hooks and bulk operationsInitialize new entities, handle database hydration and track persistence automatically.
Chapter 12 Runtime and connection driversConfigure MySQL, PostgreSQL and Small Swoole DB runtimes.
Upgrade Upgrade to Core 3Review dependency changes, removed form integration and new query builders.