Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Doctrin2] Dwukrotne wykonywanie zapytań, doctrine/orm (2.3.4)
skowron-line
post
Post #1





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

Ostrzeżenie: (0%)
-----


Witam, jak w temacie doctrine2 wykonuje każde zapytanie 2 razy.
  1. use Doctrine\ORM\Tools\Setup;
  2. use Doctrine\ORM\EntityManager;
  3.  
  4. include_once('../vendor/autoload.php');
  5.  
  6. $Dloader = new Doctrine\Common\ClassLoader('Entity', '../');
  7. $Dloader->register();
  8.  
  9. $config = Setup::createAnnotationMetadataConfiguration(array(
  10. '../Entity'
  11. ), false);
  12.  
  13. $em = EntityManager::create(array(
  14. 'driver' => 'pdo_mysql',
  15. 'user' => 't',
  16. 'password' => '',
  17. 'dbname' => 'test',
  18. ), $config);
  19.  
  20. $em->find('Entity\Price', 1);

i z loga
  1. 130816 14:29:51 109 Connect root@localhost ON test
  2. 130816 14:29:52 109 Query SELECT t0.id AS id1, t0.product_id AS product_id2, t0.product_name AS product_name3, t0.price AS price4 FROM prices t0 WHERE t0.id = 1
  3. 109 Quit
  4. 110 Connect root@localhost ON test
  5. 110 Query SELECT t0.id AS id1, t0.product_id AS product_id2, t0.product_name AS product_name3, t0.price AS price4 FROM prices t0 WHERE t0.id = 1
  6. 110 Quit

Czy ktoś się spotkał z takim problemem (IMG:style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.12.2025 - 01:54