Skip to content

Attempting to set visible columns as a join on ForeignKey fails #431

@Skelmis

Description

@Skelmis

When attempting to set visible columns to a join column on a ForeignKey column the entire table UI will fail to display data as the admin UI doesn't know how to handle it.

Code:

class Manager(Table):
    name = Text()

class Band(Table):
    manager = ForeignKey(references=Manager)

TableConfig(Band, visible_columns[Band.id, Band.manager.name])

Resulting schema:

{"extra":{"visible_column_names": ["id", "name"]},...}

Therefore the client attempts to look for Band.name, which results in it failing.

I believe this to be because it's simply not a supported feature (ForeignKey joins in table configs), but raising it none the less so I can document it

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