haskell-beam / haskell-beam/beam

fieldNamed does not work for columns that refetence other tables

Open
#579 4 comments 0 reactions 0 assignees View on GitHub
docs
Dominant language
Haskell
Stars
635
Forks
193
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.