Skip to content

Commit ed9d876

Browse files
claude[bot]claude
andauthored
docs(data-modeling): the unique default cell states the type-conditional default (#14940) (#15505)
`FieldSchema` has materialised `unique` type-conditionally since #13894 landed (PR #14904): an omitted `unique` resolves to `'organization'` on an `autonumber` field and to `false` on every other type; an explicit `unique: false` is the opt-out. The Universal Field Properties table on `field-types.mdx` still stated one flat `false`, so an author reading the table got a wrong answer for one field type. Re-measured on current `main` through the built `@objectstack/spec` before writing the cell: autonumber (unique omitted) -> ok=true unique="organization" autonumber (unique: false explicit) -> ok=true unique=false text (unique omitted) -> ok=true unique=false number (unique omitted) -> ok=true unique=false The `autonumber` callout at `:485` / `:493` is deliberately UNCHANGED: its "guarantees a unique, ever-increasing business identifier" is true against the post-#13894 schema, and the wording of the new cell is kept consistent with it and with the `unique` doc block in `FieldSchema`. Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 582bea6 commit ed9d876

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/docs/data-modeling/field-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ These properties are available on **all** field types:
653653
| `description` | `string` | — | Field description / help text |
654654
| `type` | `FieldType` | **required** | One of the supported field types |
655655
| `required` | `boolean` | `false` | Whether the field is required |
656-
| `unique` | `boolean \| 'global' \| 'organization'` | `false` | Unique constraint **and its scope** (ADR-0120). `'organization'` = one holder per organization; `true` = that same per-organization scope (positional synonym — prefer the explicit spelling in new code); `'global'` = one holder across the whole installation; `false` = no constraint. `'tenant'`/`'org'` are rejected — the word is `'organization'`. Full rule in the `unique` doc block in [`FieldSchema`](/docs/references/data/field) |
656+
| `unique` | `boolean \| 'global' \| 'organization'` | `false` (`'organization'` on `autonumber`) | Unique constraint **and its scope** (ADR-0120). `'organization'` = one holder per organization; `true` = that same per-organization scope (positional synonym — prefer the explicit spelling in new code); `'global'` = one holder across the whole installation; `false` = no constraint. Omitted ⇒ `false`, except on an `autonumber` field, where omitted ⇒ `'organization'` — an auto-number is a business identifier, so the platform makes it unique per organization by default; write `unique: false` explicitly to opt out. `'tenant'`/`'org'` are rejected — the word is `'organization'`. Full rule in the `unique` doc block in [`FieldSchema`](/docs/references/data/field) |
657657
| `multiple` | `boolean` | `false` | Allow array of values (multi-record lookup, multi-select, multi-file). An emptied multi-value lookup reads back as `[]`, never `null` — the `multiple` doc block in [`FieldSchema`](/docs/references/data/field) |
658658
| `searchable` | `boolean` | `false` | Include in search index |
659659
| `sortable` | `boolean` | `true` | Allow sorting by this field |

0 commit comments

Comments
 (0)