Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key on embedded field #99

Open
yaitskov opened this issue Oct 26, 2020 · 0 comments
Open

Key on embedded field #99

yaitskov opened this issue Oct 26, 2020 · 0 comments

Comments

@yaitskov
Copy link

data T1 = T1 { _t1_F1 :: Int }

data T2 = T2 { _t2_F2 :: T1 }

mkPersist(defaultCodegenConfig { namingStyle = escapeUnderscore })
  [groundhog|
definitions:
  - entity: T2
    dbName: t2
    autoKey: null
    keys:
      - name: Xxx
        default: true
    constructors:
      - name: T2
        uniques:
          - name: Xxx
            type: primary
            fields: [_t2_F2._t1_F1]
|]

    Exception when trying to run compile-time code:
      Not found field with name "_t2_F2._t1_F1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant