Skip to content

docs(spec): the number series is configuration, not model - #2

Open
delchev wants to merge 1 commit into
mainfrom
docs/numbering-series-declaration
Open

docs(spec): the number series is configuration, not model#2
delchev wants to merge 1 commit into
mainfrom
docs/numbering-series-declaration

Conversation

@delchev

@delchev delchev commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Rewrites the Document numbering section for the redesigned number: attribute:

  • the intent references a series by name only - the format, scope and resetOn keys are removed
  • a number is a literal prefix + the sequence zero-padded to a total width; no token grammar
  • the series is a deployment-level business object: a module ships a series declaration (a requirement, like its role declarations) that provisions a missing series with default prefix/width and never overwrites an existing one; differing re-declarations of one series are an error
  • per: <to-one relation> partitions a series (canonically per company - two legal entities never share a counter; identical numbers across partitions are correct)
  • sequences are continuous and never auto-reset - an annual restart is an administrator setting prefix + next value
  • allocating from an undeclared series is an error

Also updates the number: example in the reference card.

The number: attribute now references a series by name only - format,
scope and resetOn are gone. A series is a deployment-level business
object: a literal prefix + a zero-padded sequence, provisioned by a
module's series declaration, configured per deployment, partitioned
by a to-one relation via per:, and never auto-reset.
@delchev

delchev commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

One addition to fold into this rewrite (or a follow-up): a PARTITIONED series' declaration may name its partition source"partitions": {"table": "...", "key": "...", "label": "..."} — the physical table its partition values come from. It lets the numbering settings label each partition row by the entity's display name and list a row for every partition value BEFORE its first allocation, so an operator seeds a partition's starting number before its first document (saving such a row provisions it exactly as the first allocation would have — base shape inherited, then the edit). Identifiers are plain SQL names validated at parse; a differing cross-module re-declaration fails the artefact like a differing shape. Implemented in the reference implementation (eclipse-dirigible/dirigible#6507).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant