Symfony 3 - Doctrine 2.5 composite primary key not import
<p>I am trying to make a <strong><em>mapping:import</em></strong> with composite keys.<br>
The problem is the table with the composite key is not imported.</p>

<p>Here is the sql example:</p>

<pre><code>CREATE DATABASE composite_key;
USE composite_key;

CREATE TABLE company (
    id_company INT NOT NULL  AUTO_INCREMENT,
    name VARCHAR(200) NULL,
    PRIMARY KEY (id_company)
);

CREATE TABLE users (
    id_user INT NOT NULL  AUTO_INCREMENT,
    name VARCHAR(200) null,
    PRIMARY KEY (id_user)
);

CREATE TABLE reference (
    id_company INT NOT NULL,
    id_user INT NOT NULL,
    PRIMARY KEY (id_company,id_user),
    FOREIGN KEY (id_company) REFERENCES company(id_company),
    FOREIGN KEY (id_user) REFERENCES users(id_user)
); 

INSERT INTO users (`name`) VALUES ('test1');
INSERT INTO users (`name`) VALUES ('test2');
INSERT INTO users (`name`) VALUES ('test3');

INSERT INTO company (`name`) VALUES ('company1');
INSERT INTO company (`name`) VALUES ('company2');
INSERT INTO company (`name`) VALUES ('company3');

INSERT INTO reference (`id_company`,`id_user`) VALUES (1,1);
INSERT INTO reference (`id_company`,`id_user`) VALUES (2,2);
INSERT INTO reference (`id_company`,`id_user`) VALUES (3,3);
</code></pre>

<p>Result execute query</p>

<p><a href="https://i.stack.imgur.com/6dzbt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6dzbt.png" alt="enter image description here"></a></p>

<p>After this I have create a new Symfony project without problems. Then I proceded make the import with the next comands</p>

<p>Generating data</p>

<pre><code>php bin/console generate:bundle --namespace=CompositeBundle --format=yml
php bin/console doctrine:mapping:import CompositeBundle
php bin/console doctrine:generate:entities CompositeBundle
</code></pre>

<p>Finally we have the result:</p>

<p><a href="https://i.stack.imgur.com/X2N1t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X2N1t.png" alt="enter image description here"></a></p>

<p>It only creates users and company entities.</p>

<p>Somone Know why of this?</p>

<p>If you need the entities and the yml I will post them. I'm not posting them now beacause the post is getting to long.</p>