GORM Playground Link
https://github.com/go-gorm/playground/pull/758
Description
I'm using a Postgres database with primary key default values of generated by default as identity. There are 2 issues here:
- If the primary key is used as a foreign key, then the foreign key field will also have a default value of
generated by default as identity. - The primary key type is not bigint as specified by
type:.
Below is a screenshot of the playground CI running:
Related issues: #5222 #5534 (they were missing the playground link, so I opened this)
Expected behavior
- ID The ID field correctly use the
type:tag,biginttype andgenerated by default as identity. - Referenced foreign keys should not use the parent key's
type:tag.