Skip to content

feat: add @@delegateMap attribute to custom delegate value mapping#6

Draft
Copilot wants to merge 10 commits into
devfrom
copilot/fix-delegate-column-enum-types
Draft

feat: add @@delegateMap attribute to custom delegate value mapping#6
Copilot wants to merge 10 commits into
devfrom
copilot/fix-delegate-column-enum-types

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 4, 2026

  • Understand current state and plan changes
  • Revert @@delegate to single-arg form in stdlib.zmodel; add @@delegateMap attribute
  • Revert isDelegateModel in language/utils.ts and sdk/model-utils.ts
  • Update ts-schema-generator.ts to read discriminatorValue from @@delegateMap
  • Update language tests to use @@delegateMap (10 tests pass)
  • Update regression tests to use @@delegateMap (4 tests pass)
  • Add validation: @@delegateMap must be on a child model of a delegate
  • Fix code review: simplify nested if statements

Copilot AI and others added 8 commits April 2, 2026 05:00
…-content

feat(orm): implement discriminated union return types for delegate (polymorphic) models
…rence-for-content

Revert "feat(orm): implement discriminated union return types for delegate (polymorphic) models"
…ValueString; improve test assertion

Agent-Logs-Url: https://github.com/motopods/zenstack/sessions/7a477e37-ef5e-4109-90fd-7665b7cf505a

Co-authored-by: motopods <58200641+motopods@users.noreply.github.com>
Copilot AI and others added 2 commits April 8, 2026 13:15
@motopods motopods changed the title feat: add enum discriminator value support to @@delegate attribute feat: add @@delegateMap attribute to custom delegate value mapping Apr 8, 2026
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.

2 participants