Examples

Practical code examples to help you get started with Stabilize ORM

Basic CRUD Operations
BeginnerRepository
Create, read, update, and delete records with simple examples
Working with Relationships
IntermediateRelations
Define and query one-to-many and many-to-many relationships
Versioning & Time-Travel
AdvancedVersioning
Track changes and query historical data
E-Commerce Store
IntermediateTransactions
Products, categories, customers, orders, and order items with transactions
REST API with Express
IntermediateAPI
Build a full REST API with pagination, filtering, and optimistic locking
Query Builder Deep Dive
AdvancedQuery Builder
Joins, subqueries, CTEs, unions, aggregations, and raw SQL
Soft Deletes & Recovery
BeginnerSoft Delete
Soft delete, recover, bulk operations, and permanent deletion
Caching & Performance
AdvancedPerformance
Enable caching, cache strategies, cache invalidation, and performance tuning
Hooks & Lifecycle Events
IntermediateHooks
Before/after hooks, event listeners, and middleware patterns

In this section

Examples reads top to bottom. Each page also links to the next, so you can start at the beginning and follow along.