Skip to content

5.1.2: generated code for a parent link to a fieldset fails Column validation #279

Closed

Description

@athomson-tesseratx

Summary

In 5.1.2, generate-files writes a column that its own Column validation rejects when a schema
has a parent link to a fieldset. Importing the generated entity_schemas package then fails, so
diff and revision can't run at all. This appeared in 5.1.2; 5.1.0 generated the same field
without parent_link.

Steps to reproduce

  1. Create a fieldset F and a schema A that implements it.
  2. On schema B, add a link field to fieldset F and mark it as a parent link.
  3. Run liminal generate-files <tenant> -p out, then import out.entity_schemas.

Actual

Generated:

parent_f: SqlColumn = Column(name="Parent F", type=BenchlingFieldType.ENTITY_LINK, required=True, parent_link=True)

Import:

ValueError: Column Parent F: Parent link cannot be set without an entity link.

Cause

Removing parent_link=True from the generated line makes the import work, but diff then reports
parent_link drift on that field on every run, so hand-editing isn't a real workaround.

Expected

Generated models always import, and a fieldset parent link round-trips through diff without drift.

Suggested fix

Short term, either allow parent_link without entity_link when the link targets a fieldset, or have
the remote conversion and the generator treat fieldset links consistently (e.g. drop parent_link on
both sides when the target can't be named). Longer term, this is part of fieldset coverage (#30): the
link could carry the fieldset's identifier as its target.

The same path may also apply to a parent link whose target schema the App can't see (it would also
have no entity_link). We haven't confirmed that case.

Activity

  1. linked a pull request that will close this issue(closes #279) Fix parent_link Fieldset bug #282on Nov 10, 2026
  2. added a commit that references this issue on Nov 13, 2026
    04c3fdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions