I declared the Primary Key as follows.
-------------------------
| Test |
-------------------------
| Key1 |
| Key2 |
| Data1 |
-------------------------
When I run "Update database from Model" in efml Designer,
I expected the generated SQL to be:
CREATE TABLE TESTS (
KEY1 CHAR(2) NOT NULL,
KEY2 CHAR(2) NOT NULL,
DATA1 VARCHAR(100) NOT NULL,
PRIMARY KEY (KEY1, KEY2)
);
However, the generated SQL is as follows:
CREATE TABLE kidsbrown.TESTS (
KEY1 CHAR(2) NOT NULL,
KEY2 CHAR(2) NOT NULL,
DATA1 VARCHAR(100) NOT NULL,
PRIMARY KEY (KEY2, KEY1)
);
What's the problem?
The version I am using is 8.12.1278.
Primary Key creation order is incorrect.
Re: Primary Key creation order is incorrect.
Thank you for your report. We have reproduced the issue and are investigating it. We will notify you about the result.
Re: Primary Key creation order is incorrect.
The bug with detecting order of columns in composite primary key with two or more columns by Update To Database and by Update From Database wizards in EF Core is fixed: viewtopic.php?f=2&t=38261.