Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: 2.0-BETA1
-
Fix Version/s: None
-
Component/s: ORM
-
Security Level: All
-
Labels:None
Description
Still getting into setting up models with Doctrine2 and testing as I go...
It is my understanding that the @DiscriminatorColumn annotation defines a table column in the underlying table (i.e. when run through SchemaTool).
If this is correct, shouldn't @DiscriminatorColumn support the columnDefinition attribute? This would allow this field to be setup as an ENUM in MySQL, for example... i.e.
/**
* @Entity
* @InheritanceType("JOINED")
* @DiscriminatorColumn(name="discr", type="string", columnDefinition="ENUM('foo', 'bar', 'baz')")
* @DiscriminatorMap({"foo" = "FooEntity", "bar" = "BarEntity", "baz" = "BazEntity"})
*/
class ParentEntity {
// ...
}