Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8340113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:05:17+00:00 2026-06-09T05:05:17+00:00

I want to generate entity classes from a database for my symfony application. So

  • 0

I want to generate entity classes from a database for my symfony application.
So I followed the following three steps (From How to generate Entities from an Existing Database)

 1. php app/console doctrine:mapping:convert yml ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm --from-database --force

 2. php app/console doctrine:mapping:import AcmeBlogBundle yml

 3. php app/console doctrine:generate:entities AcmeBlogBundle

For knowing the working of these three commands, I just removed all files from ./src/Acme/BlogBundle/Resources/config/doctrine/metadata/orm. I added one more field in one table. After that I followed command-2 and command-3.

I checked the modified table’s entity for the new field. The new field was present in the entity.

Then why should we use the doctrine:mapping:convert command in order to generate entities from an existing database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T05:05:18+00:00Added an answer on June 9, 2026 at 5:05 am

    Once you have generated your entity classes, Doctrine is intelligent enough to get all the information it needs to import the mapping from the Entity classes, not needing the class metadata obtained in your first step. If you had deleted the metadata AND the entity classes then you would not be able to run step 2 without running step 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to generate a single entity from database using the Symfony2 console
I have generated entity model from my database which created entity classes. 1) Is
When I generate entity classes using LINQ to SQL I get what I want
All, We have 300 entity classes that was generated from existing DB schema for
I want to generate an HTML table from a couple specified parameters. Specifically, the
I want to generate a bar graph from from a csv file my data
I want to generate a LaTeX document from Objective-C and compile it with pdfLatex
So I have an existing database but I was unable to follow the steps
We have some JPA entity classes which are currently under development and wouldn't want
Is it possible to generate a .xcdatamodel (CoreData data model) from an existing SQLite

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.