Skip to content

fieldNamed does not work for columns that refetence other tables #579

Open
@Fingerzam

Description

@Fingerzam

The documentation instructs using Database.Beam.Schema.Tables.fieldNamed if the default name does not match actual column name. However, if I try to use it for a column that references another table, it fails to compile with

    • Couldn't match expected type ‘PrimaryKey
                                      RunT
                                      (BeamTables.FieldModification
                                         (BeamTables.TableField DbStateT))’
                  with actual type ‘BeamTables.FieldModification
                                      (BeamTables.TableField tbl0) a0’

Is there another function that I'm supposed to use here? If so, could it be added to the documentation? Otherwise, can such a function be added together with an IsString instance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions