[DDC-1972] Throw an exception when setting cascade options which do not exist Created: 08/Aug/12 Updated: 08/Aug/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1.6 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | George Zankevich | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I made the assumption that the way to define a cascading delete is to do (in YAML): cascade: [delete] When it is actually: cascade: [remove] It would be nice if Doctrine would throw an exception when the user sets a cascade option which does not exist. |
[DDC-1765] SchemaTool Commands should accept both --force and --dump-sql Created: 04/Apr/12 Updated: 17/Nov/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Rafael Dohms | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When running SchemaTool for schema operations you can get either a --dump-sql or make the changes using --force When you run with --force you get a generic "1 query executed" response, there should be a way to execute it receiving feedback of the queries and making the changes. This is good for example for my automated test env builder, as the return of this command would be logged. But i see no reason why the script can't take both options. |
| Comments |
| Comment by Paweł Nowak [ 17/Nov/12 ] |
|
Proposed fix: https://github.com/doctrine/doctrine2/pull/517 |
[DDC-1761] Small error on DQL documentation page Created: 03/Apr/12 Updated: 03/Apr/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | Tim Roediger | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
On this document page: The following lines are present: There is an error in: It should read |
[DDC-1614] On OneToOne mappings with Primary Key same as Foreign Key, using @Id in the foreign association does not carry over when running "generate-entities" with --generate-annotations=1 Created: 22/Jan/12 Updated: 23/Jan/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers, ORM, Tools |
| Affects Version/s: | 2.1.1 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Ryan Fink | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Fedora 15, php 5.3.8 |
||
| Description |
|
When having a OneToOne mapping that has a primary key that is the same as the foreign key, using the @Id attribute does not carry over when generating entities. Example code: class User
/**
class User_ExtraAttrs
When running "doctrine orm:generate-entities --regenerate-entities=1 --generate-annotations=1", the @Id in User_ExtraAttrs does not carry over. It must be manually inserted. |
[DDC-1611] Tools Reference example is apparently wrong Created: 19/Jan/12 Updated: 20/Jan/12 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | Tarcísio Fischer | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I was reading http://www.doctrine-project.org/docs/orm/2.1/en/reference/tools.html The example seems to be wrong. use Doctrine\DBAL\Tools\Console\Helper\EntityManagerHelper; That's all. |
| Comments |
| Comment by craz [ 20/Jan/12 ] |
|
Yes, this is a real problem. fixation and helped me |
[DDC-1466] Entity ID hash generation improvement in UnitOfWork Created: 03/Nov/11 Updated: 03/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | Git Master |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Aigars Gedroics | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Currently ID hash is generated using implode function with space character. I would like to point out that problems may raise if the ID column values are allowed to contain the space themselves - different objects could return equal ID hash values. The trivial one-line solution would be to serialize the array instead. Cheaper solution from performance perspective would be escaping the space character for ID values. |
[DDC-1169] Entities outside of drivers' namespaces only give 'is not a valid entity' Created: 25/May/11 Updated: 25/May/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.1 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Jiří Petruželka | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, |
[DDC-1076] It should be possible to supply EntityManager with a custom ProxyFactory Created: 24/Mar/11 Updated: 25/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | David Reisch | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Description |
|
It is plausible that one might want to handle the loading of proxy classes in their own way, perhaps not using the filename/class scheme doctrine currently comes with. Currently the only way to provide your own implementation of ProxyFactory is to subclass EntityManager. Even this is not clean since one also must copy/paste the EntityManager::create factory method to get identical behavior. It would be nice if there was a ProxyFactory interface and one could provide an instance of it to Doctrine\ORM\Configuration when creating an EntityManager. |
| Comments |
| Comment by David Reisch [ 24/Mar/11 ] |
|
I would be happy to contribute a patch to this end. |
| Comment by Benjamin Eberlei [ 25/Mar/11 ] |
|
Can you elaborate on your use-case? proxies are sorft of a by product, to be genreated in a temporary cache directory. I don't see why one should bother about how it is done. |
| Comment by David Reisch [ 25/Mar/11 ] |
|
Hi, Anyhow, here's my pitch: I personally do not like using inheritance for proxies (it feels hackish to me), preferring instead to have interfaces for my Business Objects which the proxies implement. To that end, I do not generate my proxies with doctrine, but maintain my own, in my code base, and the class files do not necessarily match up to the doctrine ProxyFactory's assumptions about where to find the classes. Regards, |
[DDC-1004] Option for mapping:import to not write Entity Files if they exist Created: 27/Jan/11 Updated: 27/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | s.rohweder | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
There should be an option to omit the creation of allready existing entities: Use Case: if you develop your model in the database and create the entities with the cli and then go on with development and create new tables you would build the entities again with the cli. This will kill your allready existing and possible extended entities. Best would be if you have to set the option when you want the existing entities overwritten. so you cant accidently overwrite them |
[DDC-1003] Documentation refers to EAGER loading as FETCH Created: 26/Jan/11 Updated: 26/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | jared fraser | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Throughout the documentation found in the following link (http://www.doctrine-project.org/docs/orm/2.0/en/reference/xml-mapping.html) when mentioning eager or lazy loading the documentation says FETCH instead of EAGER. E.G. content says "fetch - Either LAZY or FETCH" which should read "fetch - Either LAZY or EAGER" This occurs in a few different areas on this page. |
[DDC-940] Entities can / can not have private properties Created: 15/Dec/10 Updated: 15/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | 2.0-RC2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | Ray Rehbein | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.3 (cli) (built: Nov 14 2010 16:54:26) |
||
| Description |
|
In the note in If this is the only reason entities can't have private properties, then this restriction is no longer valid, or possibly be reconsidered. <?php
class A {
private $a = null;
public function setValue($value) {
$this->a = $value;
}
}
class B extends A {}
$b = new B();
$b->setValue("B");
var_dump($b);
$c = unserialize(serialize($b));
var_dump($c);
The output suggests private variables are serialized, and are restored fine |
[DDC-823] Errors in 2.0 Cookbook Documentation Created: 01/Oct/10 Updated: 11/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Task | Priority: | Trivial |
| Reporter: | Ralfas Jegorovas | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Paragraph 1: Paragraph 2: What would be the best way to note other errors? |
| Comments |
| Comment by Benjamin Eberlei [ 04/Oct/10 ] |
|
The best way for us would be if you fork the docs on github, change the stuff and commit it. Then issue a pull request. It sounds complicated, but should be minimal overhead of ~5 minutesn on your end, but then we can merge it with a mouse-click, so we dont need to duplicate the whole correction effort on our end. |
| Comment by Joel Clermont [ 27/Jan/11 ] |
|
I have fixed the typos from this ticket that were still present in the docs and issued a pull request on Github. |
| Comment by Michael Ridgway [ 11/Jul/11 ] |
|
This issue should be closed: https://github.com/doctrine/orm-documentation/pull/17 |
[DDC-605] Include Fowards Compatible Support for Scalar Type Hints Patch in ProxyFactory Created: 21/May/10 Updated: 08/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Benjamin Eberlei | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
ProxyFactory needs foward compatible support for the scalar type hint patch: http://ilia.ws/archives/217-Scalar-Type-Hints-are-Here!.html |
| Comments |
| Comment by Roman S. Borschel [ 23/May/10 ] |
|
I would be surprised if that would not be reverted soon though |
[DDC-567] Foreign Key to Unique Field Update Failure Created: 03/May/10 Updated: 08/Oct/12 |
|
| Status: | Reopened |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.0-BETA2 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | New Feature | Priority: | Trivial |
| Reporter: | Michael Ridgway | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
I am getting an error: 'Notice: Undefined index: sysname in ./libraries/Doctrine/ORM/Persisters/BasicEntityPersister.php on line 434' when I try to flush a change to a property that references a unique field on another object. From poking around in the _prepareUpdateData function, it seems that it only allows you to use identifier fields: $newValId = $uow->getEntityIdentifier($newVal); .. $result[$owningTable][$sourceColumn] = $newValId[$targetClass->fieldNames[$targetColumn]]; I'll see if I can get a test case for this set up. |
| Comments |
| Comment by Roman S. Borschel [ 03/May/10 ] |
|
Hi. That is right. Foreign keys (join columns) must point to primary keys, not arbitrary other columns, whether they're unique or not, Doctrine does not know. In other words, joinColumn must always refer to an identifier/pk. I'm not sure but I think anything else would be a pretty strange relational model, too, but there may be usecases we have not yet encountered. I'm afraid this will not be possible and would be very hard to implement. Of course if somebody has a patch we happily accept it (after reviewing). Leaving this open in the case somebody wants to work on it. |
| Comment by Michael Ridgway [ 03/May/10 ] |
|
A minimal test case. Removing the first flush produces the same error, so this seems to be a bug on inserts as well. |
| Comment by Roman S. Borschel [ 03/May/10 ] |
|
Its not really a bug but rather a new feature |
| Comment by Michael Ridgway [ 03/May/10 ] |
|
Ah, ok. Maybe it didn't work before. I don't know where I got the idea that it did. Thanks. |
| Comment by Michael Ridgway [ 03/May/10 ] |
|
Oops, closed it before I noticed you said you wanted to leave it open. |
| Comment by Roman S. Borschel [ 03/May/10 ] |
|
Thanks for the testcase though, it is useful. In your concrete example, is it not an option to make the sysname the @Id ? |
| Comment by Michael Ridgway [ 03/May/10 ] |
|
Yes. That is definitely the way it should be done in this case. I can't really think of a case to have a reference to a unique key while still having an Id on it, except when you're working with an existing, poorly designed database (which is our case). The reason I assumed this was possible is that the references actually work for lazy loading, but as soon as you start changing the references it throws this error. |
| Comment by Roman S. Borschel [ 14/May/10 ] |
|
Lowering priority. |
| Comment by Thomas Subera [ 08/Oct/12 ] |
|
although we would also need this i would suggest adding an error message if the associated column is not found in $newValId. (class BasicEntityPersister.php _prepareUpdateData) otherwise the field is populated with null leaving the developer debugging an hour :-/ thx |