1
0
mirror of synced 2024-12-15 07:36:03 +03:00

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:
Gary Hockin 2012-08-07 13:26:51 +02:00
parent 711844296d
commit b6ddb58634

View File

@ -821,15 +821,14 @@ We also have to create a general bootstrap file for our application:
<?php
// bootstrap.php
if (!class_exists("Doctrine\Common\Version", false)) {
require_once "bootstrap_doctrine.php";
}
require_once "entities/User.php";
require_once "entities/Product.php";
require_once "entities/Bug.php";
if (!class_exists("Doctrine\Common\Version", false)) {
require_once "bootstrap_doctrine.php";
}
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
.. 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')``
we have to adjust the metadata slightly.