I have a problem in an application that I'm developing, I created the templates using the ADO.NET Entity Data Model.
But a specific table is not showing up below the script I'm using to create the table, it's created and it works but no template is created for it.
SQL script that I'm using to create the table
-- -----------------------------------------------------
-- Table tb_r_veiculo_adicionais
-- -----------------------------------------------------
CREATE TABLE tb_r_veiculo_adicionais (
veiculo INT NOT NULL,
adicional INT NOT NULL,
PRIMARY KEY (veiculo, adicional),
FOREIGN KEY (veiculo) REFERENCES tb_veiculo (codigo),
FOREIGN KEY (adicional) REFERENCES tb_adicionais (codigo)
)
The error returned is below
Error 1 Error 3003: Problem in mapping fragments starting at line 528: Given the cardinality of Association End Member tb_veiculo, it should be mapped to key columns of the table tb_r_veiculo_adicional. Either fix the mapping or change the multiplicity of this end. C: \ Users \ Hiago \ documents \ visual studio 2013 \ Projects \ ProjectJonathan \ ProjectJonathan \ project_jonathan.edmx 529 11 Jonathan Project
Note: When you delete EDMX and create works, only the template of the tb_r_veiculo_adicionais
table is not generated.
UPDATE : I noticed that the problem only occurs when I create the foreign keys.