Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>TL;DR: Make sure the type of metadata you created matches the "create metadata configuration" method you used.</strong></p> <p>I encountered the same problem while working through the Doctrine "Getting Started" guide. After looking through the Doctrine code a bit I figured out what was going wrong. Basically, the code in the tutorial in the "Obtaining the EntityManager" section is:</p> <pre><code>$config = Setup::createAnnotationMetadataConfiguration( array(__DIR__."/src"), $isDevMode); </code></pre> <p>A little further in the tutorial, in the "Starting with the Product" section, it shows us how to set up the metadata, with an example for each of the possible options for this. The tutorial says:</p> <blockquote> <p>Metadata for entities are configured using a XML, YAML or Docblock Annotations. This Getting Started Guide will show the mappings for all Mapping Drivers. References in the text will be made to the XML mapping.</p> </blockquote> <p>Because of this statement, I decided to use the XML configuration. Unfortunately, the <code>createAnnotationMetadataConfiguration</code> method in the tutorial code did not seem to be using the XML file I had created. (In hindsight, it seems much more obvious that this method is <em>specifically referring to annotation metadata, not XML metadata!</em>)</p> <p>After I changed it to <code>createXMLMetadataConfiguration</code> instead, it worked as expected. So it looks like one possible source of this problem is that the "create metadata configuration" method you used may not match the type of metadata you created.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload