Serialising all possible primary key definitions properly.