symfony - Symfony2: doctrine:mapping:import throws Doctrine\ORM\Mapping\MappingException - Table [...] has no primary key. -
i want import doctrine mapping table called stores. do:
./app/console doctrine:mapping:import mybundle annotation --filter="stores"
i error:
[doctrine\orm\mapping\mappingexception] table cat_map has no primary key. doctrine not support reverse engineering tables don't have prima ry key.
am using filter incorrectly? dont want doctrine try , map table other 'stores'
requested create syntax:
create table `stores` ( `id` int(11) unsigned not null auto_increment, `storeid` int(11) not null, `store` text not null, primary key (`id`) ) engine=myisam auto_increment=96 default charset=utf8;
despite --filter attribute doctrine analyse tables. if ok go through filter creating specified entity.
so, should try fix cat_map table adding primary key. if you're not figuring out way or if got particular needs, please update question including cat_map part.
i hope helps!
Comments
Post a Comment