Entities Module
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 sets the user’s role to "admin" but does NOT bypass RLS. Your RLS rules must include admin access (e.g., { "user_condition": { "role": "admin" } }) for service role operations to succeed.
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.