Black Friday 2022 Offers 30% discount in SymfonyInsight yearly business plan (offer ends in 2 days)

How to Generate Entities from an Existing Database

Edit this page

Warning: You are browsing the documentation for Symfony 4.4, which is no longer maintained.

Read the updated version of this page for Symfony 6.2 (the current stable version).

How to Generate Entities from an Existing Database

Caution

The doctrine:mapping:import command used to generate Doctrine entities from existing databases was deprecated by Doctrine in 2019 and it's no longer recommended to use it.

Instead, you can use the make:entity command from Symfony Maker Bundle to quickly generate the Doctrine entities of your application.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.