Skip to main content
This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the developer documentation.

Entities Module

CRUD operations on data models. Access via base44.entities.EntityName.method().

Contents

Methods

Note: The maximum limit for list() 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

Event structure:

User Entity

Every app has a built-in User entity with special rules:
  • Regular users can only read/update their own record
  • Cannot create users via entities.create() - use auth.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.
  1. Authentication level: anonymous, authenticated, or service role
  2. RLS rules: Control which records (rows) users can create/read/update/delete
  3. FLS rules: Control which fields users can read/write within accessible records
Operations succeed or fail based on these rules - no partial results. RLS and FLS are configured in entity schema files (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 of EntityTypeRegistry from your project. For how to run it, use the base44-cli skill.

EntityHandler

EntitiesModule