Update en/tutorials/getting-started.rst
Cleaner to remove the note, and modify the code to put the doctrine_bootstrap.php include first?
This commit is contained in:
parent
711844296d
commit
b6ddb58634
@ -821,15 +821,14 @@ We also have to create a general bootstrap file for our application:
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
// bootstrap.php
|
// bootstrap.php
|
||||||
|
if (!class_exists("Doctrine\Common\Version", false)) {
|
||||||
|
require_once "bootstrap_doctrine.php";
|
||||||
|
}
|
||||||
|
|
||||||
require_once "entities/User.php";
|
require_once "entities/User.php";
|
||||||
require_once "entities/Product.php";
|
require_once "entities/Product.php";
|
||||||
require_once "entities/Bug.php";
|
require_once "entities/Bug.php";
|
||||||
|
|
||||||
if (!class_exists("Doctrine\Common\Version", false)) {
|
|
||||||
require_once "bootstrap_doctrine.php";
|
|
||||||
}
|
|
||||||
|
|
||||||
Generating the Database Schema
|
Generating the Database Schema
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
@ -1431,13 +1430,6 @@ the previoiusly discussed query functionality in it:
|
|||||||
|
|
||||||
Dont forget to add a `require_once` call for this class to the bootstrap.php
|
Dont forget to add a `require_once` call for this class to the bootstrap.php
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
**require_once gotcha**
|
|
||||||
|
|
||||||
Make sure you add the require_once call for `BugRepository.php` *after* the require_once
|
|
||||||
call for `bootstrap_doctrine.php`, or you will get some class not found errors.
|
|
||||||
|
|
||||||
To be able to use this query logic through ``$this->getEntityManager()->getRepository('Bug')``
|
To be able to use this query logic through ``$this->getEntityManager()->getRepository('Bug')``
|
||||||
we have to adjust the metadata slightly.
|
we have to adjust the metadata slightly.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user