Skip to content

Correct notation for compound primary key #6685

Closed Answered by JonasDoe
JonasDoe asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, found it out myself:
After short debugging through the source code, it the whole primaryKey entry is not parsed correctly:

So I figured I'ld might have to seperate these values with a semicolon, e.g. gorm:"type:varbinary(16);primaryKey;priority:1;index:src_id_and_type,priority:1". That seemed to work!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JonasDoe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant