Le 14/06/2014 14:26, Frank Houweling a écrit :
Hi Guys,
I'm currently working with Class Table Inheritance, but I can't even get the
most simple DQL query to work.
The following DQL query:
SELECT b FROM \Fruitbomen\Models\Organization\Employee b
Results in the following SQL query:
SELECT p0_.id AS id0, p0_.givenname AS givenname1, p0_.surname AS surname2,
e1_.username AS username3, e1_.password AS password4, e1_.showprofile AS
showprofile5, e1_.description AS description6, e1_.email AS email7 FROM
employees e1_
The code I use to describe the two classes is as following:
Person.php
/** * @ORM\Entity @ORM\Table(name="persons") * *
ORM\@InheritanceType("JOINED") *
ORM\@DiscriminatorColumn(name="discr", type="string") *
ORM\@DiscriminatorMap({"person" = "Person", "employee" =
"Employee"}) */ class Person extends \Fruitbomen\Models\ModelBase{
this mapping is wrong. It should be @ORM\InheritanceType, not
ORM\@InheritanceType (same for others), like your other annotations. The
DQL is not wrong. The mapping is
--
Christophe | Stof
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.