Skip to content

backward relations should take "@omit many" on foreign table and constraints into account #505

@ab-pm

Description

@ab-pm

I want to omit some "many" fields on a table (or really, on the whole table).
Unfortunately, the @omit many smart comment only allows me to annotate the table with the foreign key constraint, dropping all its backward relations - instead of having me annotate the referenced table, on which the fields to be dropped are generated. I would enjoy having an omit(foreignTable, "many") check added to the line

if (shouldAddManyRelation && !omit(table, "many")) {
but I guess that would be a backwards-incompatible change. So if that is not possible, I'd suggest allowing many also on the individual constraints or fields, i.e. at

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions