Entity
18 pages.
An entity is a table — and the rules that are true about it. Not just its columns: what must hold for a row to exist, and who may see or change it…
`x.Stock -= n` and `x.Stock += n` on a stored number are written as ONE statement relative to the row as the database holds it, refused when it would…
The lightweight, ungated answer to "who changed this row, and when": field NAMES only, never values, newest first. Readable by anyone who may read…
`==` on two entity references compares them by ROW IDENTITY — not by object reference, and not field by field. Two references to the same row are…
Plain optimistic concurrency: refuses an update whose value was changed by somebody else after the value the write was based on — what the writer…
A `partial entity X { … }` in a bridge package or in the app adds OPTIONAL members to an entity another package declares — a reference (a column on…
Row stamps: an entity declares a field and marks it, and the platform writes into it when the row is saved — the instant it was created, who created…
`[FrontMatter]` binds a member to a key of the entity's markdown document's front-matter — the `---` header at the top of the file. Assigning the…
`[OnDelete]` on an `Entity` member says what deleting the row it references does to the row holding it: Remove deletes it too, Clear empties the…
`[Title]` on an entity says what each of its records is called — the line a notification, a search result or a link shows for it. `Records.Title(x)`…
The per-member rules the database enforces — Required, Unique, MaxLength/MinLength, Min/Max, Pattern, and the storage-shaping Immutable, Precision…
Declares a persisted type — a table of rows the app stores, queries and secures. Every entity gets an Id from the platform. Use a class instead when…
Derives one entity from another. The subtype is its own type with its own name, its own security and its own workflows, and it carries every member…
The typed members an entity holds — text, numbers, dates, booleans, Guids, enums and references. A member's type spelling carries its nullability: a…
A row-level rule spanning several members, checked when the row is written. Use it when a constraint on one member is not enough — a balance that may…
On a subtype, `override Company Organization;` narrows a reference the base declares to a type derived from the base's: the same member and the same…
One entity points at another by declaring it as a member — that is the foreign key. The parent reads its children back through a collection member…
Declares that no type may derive from this entity. A type is open unless it says otherwise, exactly as in C#. Sealing says nothing about who may read…