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 {
// ...
}
Activity
Marc Hodgins
made changes -
| Field | Original Value | New Value |
|---|---|---|
| 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 { // ... } |
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. {noformat} /** * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="discr", type="string", columnDefinition="ENUM('foo', 'bar', 'baz')") * @DiscriminatorMap({"foo" = "FooEntity", "bar" = "BarEntity", "baz" = "BazEntity"}) */ class ParentEntity { // ... } {noformat} |
Benjamin Eberlei
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Roman S. Borschel [ romanb ] | Benjamin Eberlei [ beberlei ] |
| Resolution | Won't Fix [ 2 ] |
Benjamin Eberlei
made changes -
| Workflow | jira [ 11285 ] | jira-feedback [ 14409 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback [ 14409 ] | jira-feedback2 [ 16273 ] |
Benjamin Eberlei
made changes -
| Workflow | jira-feedback2 [ 16273 ] | jira-feedback3 [ 18526 ] |
This list may be incomplete, as errors occurred whilst retrieving source from linked applications:
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-553, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)
This clutters the mapping code, i am against it, the use case is pretty slim.