Hello!
Is there a way to produce OO inheritance without providing a discriminator
column and a discriminator map?
Instead, I'd like to specify the name of the column to be used to reference
the top-most entity's table's primary key. Seems that doctrine2
automatically assumes the foreign key's name to be the same as the
referenced tables' primary key's name, which often isn't the case for
legacy databases.
Instead of what is in red, I'd like to do something like what is in green.
=)
<?phpnamespace MyProject\Model;
> /** * @Entity *@Table(name="person")* * @InheritanceType("JOINED")* *
> @DiscriminatorColumn(name="discr", type="string")
> * @DiscriminatorMap({"person" = "Person", "employee" = "Employee"})* */class
> Person{
> // ...}
> /** @Entity *@Table(name="employee") @JoinColumn(name="employee.person_id",
> referencedColumnName="person.id")* */
>
> class Employee extends Person{
> // ...}
>
>
Thanks a lot for the help.
--
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 https://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.