Module Entities
CRUD operations on data models. Access viabase44.entities.EntityName.method().
Contents
- Methods
- Examples (Create, Bulk Create, List, Filter, Get, Update, Delete, Subscribe)
- User Entity
- Service Role Access
- Permissions
Methods
Note: The maximum limit forlist() and filter() is 5,000 items per request.
Examples
Create
Bulk Create
List with Pagination
Filter
Get by ID
Update
Delete
Update Many (MongoDB-style)
Bulk Update (by ID)
Import from File
Subscribe to Realtime Updates
User Entity
Every app has a built-inUser entity with special rules:
- Regular users can only read/update their own record
- Cannot create users via
entities.create()- useauth.register()instead - Service role has full access to all user records
Service Role Access
For admin-level operations (bypass user permissions):Permissions (RLS & FLS)
Data access is controlled by Row Level Security (RLS) and Field Level Security (FLS) rules defined in entity schemas.- Authentication level: anonymous, authenticated, or service role
- RLS rules: Control which records (rows) users can create/read/update/delete
- FLS rules: Control which fields users can read/write within accessible records
base44/entities/*.jsonc). See entities-create.md for configuration details.
Note: asServiceRole bypasses RLS and FLS entirely. The client reads and writes any record in any entity without needing a matching admin rule. Use it for trusted backend logic only, and enforce your own access checks when the function needs them.
Type Definitions
RealtimeEvent
Result Types
SortField and Server Fields
Type Registry (for typed entities)
How to get typed entities: The Base44 CLI can generate entity interfaces and an augmentation ofEntityTypeRegistry from your project. For how to run it, use the base44-cli skill.
EntityHandler
EntitiesModule
Cette page a été traduite à l’aide de l’IA. Pour les informations les plus précises et à jour, consultez la version anglaise.