Removing reference to Query object before it is introduced
This commit is contained in:
parent
e71f00296e
commit
27233af0d2
@ -520,17 +520,14 @@ automatically:
|
|||||||
|
|
||||||
Now lets run a simple query to retrieve the `Employee` we just created:
|
Now lets run a simple query to retrieve the `Employee` we just created:
|
||||||
|
|
||||||
[php]
|
[sql]
|
||||||
$query = $em->createQuery('select e from Entities\Employee e where e.name = ?1');
|
select e from Entities\Employee e where e.name = 'test'
|
||||||
$query->setParameter('1', 'test');
|
|
||||||
|
|
||||||
If we check the generated SQL you will notice it has some special conditions added to
|
If we check the generated SQL you will notice it has some special conditions added to
|
||||||
ensure that we will only get back `Employee` entities:
|
ensure that we will only get back `Employee` entities:
|
||||||
|
|
||||||
[php]
|
[sql]
|
||||||
echo $query->getSql();
|
SELECT p0_.id AS id0, p0_.name AS name1, p0_.department AS department2, p0_.discr AS discr3 FROM Person p0_ WHERE (p0_.name = ?) AND p0_.discr IN ('employee')
|
||||||
|
|
||||||
// SELECT p0_.id AS id0, p0_.name AS name1, p0_.department AS department2, p0_.discr AS discr3 FROM Person p0_ WHERE (p0_.name = ?) AND p0_.discr IN ('employee')
|
|
||||||
|
|
||||||
+++ Class Table Inheritance
|
+++ Class Table Inheritance
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user