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

  • SEARCH
  • Home
  • 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 9260355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:52:15+00:00 2026-06-18T12:52:15+00:00

I have zf2 DoctrineORMModule and DoctrienModule installed. I am trying to use the command

  • 0

I have zf2 DoctrineORMModule and DoctrienModule installed. I am trying to use the command tool to create mapping files and generate entities from these mapping files. (I know this isn’t the preferred method, but this is how I’m going to do it. I have my reasons.)

I have a restful module configured and here is my Doctrine Configuration for this module.

// Doctrine config
    'doctrine' => array(
        'driver' => array(
            'Restful_driver' => array(
                'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
                'cache' => 'array',
                'paths' => array(__DIR__ . '/../src/Restful/Entities')
            ),
            'orm_default' => array(
                'drivers' => array(
                    'Restful\Entities' => 'Restful_driver'
                )
            )
        )
    )

I first run

doctrine orm:convert-mapping xml /to/my/dest/path --from-database --force

This will create my xml file with all the table info. This part works fine and I can view the xml that it created. Next I try to run

doctrine orm:generate-entities /to/my/dest/path --generate-annotations 
--generate-methods

I don’t get any errors but also I don’t get any results either. The output from the previous command is.

No Metadata Classes to process.

I have tried to read around but havn’t found any articles that really solve my problem. Most say something about not having my annotations/mappings not configured correctly. But I can dump the entity manager through a controller.

var_dump($this->getServiceLocator()->get('doctrine.entitymanager.orm_default'));

What do I need to do to get this to generate entities from xml mappings? Any help is appreciated.

  • 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-18T12:52:16+00:00Added an answer on June 18, 2026 at 12:52 pm

    I had a similar problem with YAML files and posted my solution here. I’m sure this will work with xml files as well. Just try to add

    $driverImpl = new \Doctrine\ORM\Mapping\Driver\XmlDriver(array("YOUR_PATH_TO_XML_FILES"));
    /* @var $em \Doctrine\ORM\EntityManager */
    $em = $application->getServiceManager()->get('doctrine.entitymanager.orm_default');
    $em->getConfiguration()->setMetadataDriverImpl($driverImpl);
    

    to the doctrine-module.php.

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

Sidebar

Related Questions

have a nice day. I got problem when trying to create an image from
I'm trying to use BjyAuthorize in a sample application in ZF2 and I have
I'm quite new to ZF2. I have a bunch of doctrine entities from my
I have the following code in my zf2 controller: <?php namespace Accounting\Controller; use Zend\Mvc\Controller\ActionController,
I have ZF2 application in some cases I want to get parameter 'number' from
I'm trying to create a SOAP server in my ZF2 application that I can
I have started my ZF2 application from Skeleton-Application. I want instance of Date class
I have the example Album running in ZF2, for lear, I try to use
I have just started to explore zf2 and trying to install modules. have downloaded
I am trying to use ZF2 PhpRenderer without the MVC framework. Currently I am

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.