Skip to content

Please allow to specify two or more primary key columns (composite primary key) #114

@TheSQLWhisperer

Description

@TheSQLWhisperer

I have a table with two foreign keys (id1 and id2), there are no other columns in the table.
The primary key on this table is a composite key (id1,id2).
The current version of go-reform does not allow to specify such a primary key.
This is a common case and there is no way to use save on such a schema.

In general go-reform always assumes that there is only one primary key column and it's a serial type.
It's not even possible to preset it to some value and save the record (the library generates an UPDATE in this case)
This is a strange requirement for a generic library.

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