[DDC-947] Optmize Code-Generation Strategies Created: 24/Dec/10 Updated: 29/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.x |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We should optimize code-generation somehow. |
| Comments |
| Comment by Benjamin Eberlei [ 29/Mar/11 ] |
|
Descheduled to 2.x |
[DDC-896] Use PDepend for Code-Generation Created: 27/Nov/10 Updated: 27/Nov/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | None |
| Fix Version/s: | 2.x |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Our current code-generation tool has many shortcomings and due to its hard to test nature also many (known and unknown) bugs, as well as high maintenance. Since people are overusing this tool and I am sort of annoyed by how much time goes into this we should rewrite this in a two-step procedure: 1. Move code into Common so we can share it between ORM, Mongo and CouchDB. This gives us the advantage of having to maintaining less code for this stuff. |
[DDC-585] Create a coding standards document Created: 13/May/10 Updated: 11/Feb/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.0 |
| Security Level: | All |
| Type: | Task | Priority: | Major |
| Reporter: | Roman S. Borschel | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
We need a new coding standards document for Doctrine 2. |
| Comments |
| Comment by Benjamin Morel [ 29/Jan/13 ] |
|
Has there been any work on a coding standards document yet? |
| Comment by Marco Pivetta [ 29/Jan/13 ] |
|
Benjamin Morel Guilherme Blanco may have a CS ruleset, but it's not ready yet. Perfect timing btw, we really need to automate this to avoid having all these useless CS fix comments in pull requests |
| Comment by Benjamin Morel [ 29/Jan/13 ] |
|
Ok, I'll post my document here once ready, and Guilherme Blanco will be able to compare it with his ruleset! |
| Comment by Benjamin Morel [ 30/Jan/13 ] |
|
Here is a first draft: https://gist.github.com/4676670 Please comment! |
| Comment by Benjamin Morel [ 11/Feb/13 ] |
|
Guilherme Blanco, if you don't have time to compare your ruleset with my draft, maybe you could publish your current ruleset so that others can have a look? |
[DDC-1248] Documentation regarding prePersist and postPersist events a bit lacking Created: 04/Jul/11 Updated: 04/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Helmer Aaviksoo | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Browser |
||
| Description |
|
Please make it more clear that prePersist and postPersist events are called only when creating new entity (that is, prior and after a database insert). IRC log: Pastie code (probably expired by now): $entity->setSomething('xxx'); $entity->setSomething('yyy'); |
[DDC-473] Inadequate description for @MappedSuperclass in Annotations Reference Created: 25/Mar/10 Updated: 26/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0-ALPHA4 |
| Fix Version/s: | 2.0 |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | David Abdemoulaie | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
This doesn't adequately communicate how to use it. It took me several minutes of failing before I downloaded the PDF and did a search for @MappedSuperclass to find an example of how it's used. Specifically the following were unclear:
|
| Comments |
| Comment by David Abdemoulaie [ 25/Mar/10 ] |
|
Apparently it's also incompatible with several other tag as well. I thought it made sense to try the following and see if the @InheritanceType and @Discriminator___ tags would apply to the children classes: /**
* @MappedSuperclass
* @InheritanceType("SINGLE_TABLE")
* @DiscriminatorColumn(name="type", type="string")
* @DiscriminatorMap({"User" = "User", "Group" = "Group"})
*/
abstract class Principal
But apparently this flags D2 to treat it as an Entity anyway, resulting in the following error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sentact5.principal' |
| Comment by Benjamin Eberlei [ 28/Mar/10 ] |
|
I updated the documentation, the question is if we should check for the mapped superclass attribute and throw exceptions if other entity level annotations are specified. |
| Comment by Roman S. Borschel [ 15/Apr/10 ] |
|
A mapped superclass has not many restrictions and these are mentioned in the docs (i.e. only unidirectional associations), what David mentions above should work, if it doesnt its a bug, I think |
| Comment by Roman S. Borschel [ 15/Apr/10 ] |
|
David, @"Is this defined on the superclass or on the children classes?" It doesnt matter. A @MappedSuperclass can be anywhere in an inheritance hierarchy and it always does the same thing, inherit its mapping information to subclasses (but its not itself an entity). The docs say: Mapped superclasses, just as regular, non-mapped classes, can appear in the middle of an otherwise mapped inheritance hierarchy (through Single Table Inheritance or Class Table Inheritance).
as well as Entities support inheritance, polymorphic associations, and polymorphic queries. Both abstract and concrete classes can be entities. Entities may extend non-entity classes as well as entity classes, and non-entity classes may extend entity classes.
So entities, mapped superclasses and plain non-mapped classes can appear mixed in an inheritance hierarchy. Nevertheless all the classes in a hierarchy that are entities must use 1 inheritance strategy, you can not mix inheritance mapping strategies in a single class hierarchy. @"If it's defined on the child classes, does it take parameters? The name of the super class?" No, it doesnt. The docs dont mention any parameters either which is correct. @"It was not at all apparent to me that it was mutually exclusive with the @Entity tag" OK, that needs to be made clearer in the docs then. |
[DDC-957] When there is no GeneratedValue strategy on a primary key, setter function should be generated Created: 29/Dec/10 Updated: 29/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Flyn San | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Environment: |
PHP 5.3.3 |
||
| Description |
|
In the YAML/XML, if no GeneratedValue strategy is given for the primary key, a setter function is required in the generated entity class. Currently only a getter is made. |