3

I am trying to run the command doctrine command for entities:

./vendor/bin/doctrine orm:convert-mapping  --from-database annotation ./Models

First time I run this command for generating entity mapping files then I modify the database table and again run the same command and got this error:

In ExportException.php line 36:

  Attempting to overwrite an existing file 'D:\xampp\htdocs\docx\Models\Address.php'.


orm:convert-mapping [--filter FILTER] [-f|--force] [--from-database] [--extend [EXTEND]] [--num-spaces [NUM-SPACES]] [--namespace [NAMESPACE]] [--] <to-type> <dest-path>
flik
  • 3,433
  • 2
  • 20
  • 30

1 Answers1

3

You have to use switch -f or --force try this :

$ ./vendor/bin/doctrine orm:convert-mapping  --from-database --force annotation ./Models

and then regenerate entities

Ashfaq Muhammad
  • 780
  • 5
  • 10