Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions skills/base44-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ npx base44 <command>
| ---------------------- | ------------------------------------------- | --------------------------------------------------- |
| Create Entities | Define entities in `base44/entities` folder | [entities-create.md](references/entities-create.md) |
| `base44 entities push` | Push local entities to Base44 | [entities-push.md](references/entities-push.md) |
| RLS Patterns | Row-level security examples and operators | [rls-examples.md](references/rls-examples.md) ⚠️ **READ FOR RLS** |

#### Entity Schema (Quick Reference)

Expand Down
11 changes: 7 additions & 4 deletions skills/base44-cli/references/entities-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,13 @@ There are two condition types you can use:
}
```

**Important limitations:**
**Important notes:**
- `user_condition` only supports **simple equality** (e.g., `{ "role": "admin" }`)
- **Entity field filtering requires `data.` prefix:** Use `{ "data.fieldname": value }` to filter by entity field values
- For `data.*` field comparisons, you can use operators: `$in`, `$nin`, `$ne`, `$all`
- Logical operators `$or`, `$and`, `$nor` are available for combining conditions
- You cannot filter by entity field values directly (e.g., `{"status": "published"}`)
- Only user-related conditions are allowed

⚠️ **For advanced RLS patterns and examples, see [rls-examples.md](rls-examples.md)**

### RLS Examples

Expand Down Expand Up @@ -474,12 +475,14 @@ There are two condition types you can use:

- **user_condition is equality only:** `user_condition` only supports exact match (e.g., `{ "role": "admin" }`) - no operators
- **No comparison operators on user_condition:** `$gt`, `$lt`, `$regex`, `$expr`, `$where` are NOT supported for user conditions
- **No entity field filtering:** Cannot filter by entity field values (e.g., `{"status": "published"}`)
- **No deeply nested templates:** Templates like `{{user.data.profile.department}}` may not work

**Supported operators:**
- **Logical operators:** `$or`, `$and`, `$nor` for combining multiple conditions
- **Field operators (for `data.*` fields only):** `$in`, `$nin`, `$ne`, `$all`
- **Entity field filtering:** Use `data.` prefix to filter by entity field values (e.g., `{ "data.status": "published" }` or `{ "data.completed": true }`)

⚠️ **See [rls-examples.md](rls-examples.md) for comprehensive RLS patterns and examples**

### Complex Access Patterns

Expand Down