[DDC-2080] Entity's association changes after first call Created: 15/Oct/12 Updated: 15/Oct/12 Resolved: 15/Oct/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3, 2.3.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Koby Soto | Assignee: | Benjamin Eberlei |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Description |
|
i am using the latest version of doctrine: 2.3 when you call a generated association function, the first time everything is fine: $authors = $book->getBookToAuthors(); $authors = $book->getBookToAuthors(); $authors = $book->getBookToAuthors(); //will work public function getBookToAuthors() { return $this->bookToAuthors; }and the mapping is as follows: /**
|
| Comments |
| Comment by Koby Soto [ 15/Oct/12 ] |
|
sorry sorry sorry the target had One-To-One association instead of Many-To-One |
[DDC-2027] [GH-443] Allow 'nullable' attribute to be used during XML export Created: 13/Sep/12 Updated: 17/Sep/12 Resolved: 17/Sep/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of cas87: Url: https://github.com/doctrine/doctrine2/pull/443 Message: Allows 'nullable' attribute to be used during XML export, something which already worked for me in YamlExport. This addition saved me a lot of time during development; one less difference to deal with between the YAML and XML approach. Don't know why this was missing, maybe it's me who is missing something, so let me know |
| Comments |
| Comment by Benjamin Eberlei [ 13/Sep/12 ] |
|
A related Github Pull-Request [GH-443] was closed |
[DDC-2026] [GH-442] Remove unused code Created: 13/Sep/12 Updated: 17/Sep/12 Resolved: 17/Sep/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/442 Message: This patch remove some unused code. @beberlei please backported it to 2.3 |
[DDC-2015] [GH-437] Fixes PersistentCollection::matching() when collection is not initialize... Created: 07/Sep/12 Updated: 17/Sep/12 Resolved: 17/Sep/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of sroddy: Url: https://github.com/doctrine/doctrine2/pull/437 Message: ...d and there are NEW entities in the collection. If you have a PersistentCollection not already initialized and you add something to it and if you call matching() on it, that method doesn't return the elements you have just added even if they match the criteria. This fixes the behaviour checking for any matching element that is NEW and merging it in the returned ArrayCollection. |
| Comments |
| Comment by Benjamin Eberlei [ 07/Sep/12 ] |
|
A related Github Pull-Request [GH-437] was closed |
[DDC-2014] [GH-436] Comment fixes Created: 06/Sep/12 Updated: 17/Sep/12 Resolved: 17/Sep/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Powerhamster: Url: https://github.com/doctrine/doctrine2/pull/436 Message: This will update method comments in UnitOfWork and fixes a typo in isCollectionScheduledForDeletion. |
[DDC-2005] [GH-433] DDC-2003 - DateTime conditions in Criteria objects result in errors Created: 31/Aug/12 Updated: 17/Sep/12 Resolved: 17/Sep/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Josiah: Url: https://github.com/doctrine/doctrine2/pull/433 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 05/Sep/12 ] |
|
A related Github Pull-Request [GH-433] was closed |
[DDC-2003] DateTime conditions in Criteria objects result in errors Created: 31/Aug/12 Updated: 17/Sep/12 Resolved: 17/Sep/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Josiah Truasheim | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using DateTime conditions in Criteria objects an error is thrown because of DateTime to string conversion. This is because the `matching` method doesn't use the same functionality as the `findBy` method. |
| Comments |
| Comment by Josiah Truasheim [ 31/Aug/12 ] |
[DDC-1990] [GH-427] Fix ORMInvalidArgumentException factory methods with return instead of throw Created: 19/Aug/12 Updated: 29/Aug/12 Resolved: 29/Aug/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of chEbba: Url: https://github.com/doctrine/doctrine2/pull/427 Message: Exception factories should not throw exception but just return them |
| Comments |
| Comment by Benjamin Eberlei [ 29/Aug/12 ] |
|
A related Github Pull-Request [GH-427] was closed |
[DDC-1985] Call to undefined method ProxyException::proxyDirectoryNotWritable Created: 16/Aug/12 Updated: 17/Aug/12 Resolved: 17/Aug/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Mark van der Velden | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I think it's fairly self explanatory, didn't supply a patch since I had no idea what text you wanted there PHP Fatal error: Call to undefined method Doctrine\ORM\Proxy\ProxyException::proxyDirectoryNotWritable() in .../orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php on line 193 |
| Comments |
| Comment by Guilherme Blanco [ 17/Aug/12 ] |
|
This issue is already fixed in master |
[DDC-1982] [GH-424] Create the setCustomHydrationMode function Created: 14/Aug/12 Updated: 14/Aug/12 Resolved: 14/Aug/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Alexander |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Mezzle: Url: https://github.com/doctrine/doctrine2/pull/424 Message: This allows multiple hydrators to be set at once, and also allows for |
| Comments |
| Comment by Benjamin Eberlei [ 14/Aug/12 ] |
|
A related Github Pull-Request [GH-424] was closed |
| Comment by Alexander [ 14/Aug/12 ] |
|
PR was squashed and merged. |
[DDC-1977] Undefined index in ParameterTypeInferer Created: 10/Aug/12 Updated: 29/Aug/12 Resolved: 25/Aug/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.3 |
| Fix Version/s: | 2.2.4, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Matt Button | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.6-13ubuntu3.8 with Suhosin-Patch (cli) (built: Jun 13 2012 17:19:54) { "package": "doctrine/common", "version": "2.2.2" } , , , , |
||
| Description |
|
Trying to bind an empty array as a parameter to a raw SQL query results in an undefined index error on line 59. |
| Comments |
| Comment by Matt Button [ 10/Aug/12 ] |
|
One way to work around this is to specify the type of the array as the third parameter to addParameter |
| Comment by Fabio B. Silva [ 25/Aug/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/ece6a005bcecc4a9e4a154d9379cfbe141370415 |
[DDC-1964] [GH-417] Remove unused use statement Created: 02/Aug/12 Updated: 14/Aug/12 Resolved: 14/Aug/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of jonathaningram: Url: https://github.com/doctrine/doctrine2/pull/417 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 02/Aug/12 ] |
|
A related Github Pull-Request [GH-417] was closed |
[DDC-1962] [GH-416] [DDC-1961] Fixed parameter type support in Parameter Created: 31/Jul/12 Updated: 31/Jul/12 Resolved: 31/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Majkl578: Url: https://github.com/doctrine/doctrine2/pull/416 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 31/Jul/12 ] |
|
A related Github Pull-Request [GH-416] was closed |
[DDC-1961] BC Break: Explicit parameter type definitions are discarded when using AbstractQuery::setParameter Created: 31/Jul/12 Updated: 31/Jul/12 Resolved: 31/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | 2.3 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Michael Moravec | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In 2.2.x it was possible to explicitly specify a type of a parameter in query. In code below, I used a Type::DATE to explicitly say that it should be converted to date type rather than datetime. In 2.3-RC1, it is completely ignored.
// $query instanceof AbstractQuery
$query->setParameter('day', $date, Type::DATE)
Pull request: https://github.com/doctrine/doctrine2/pull/416 |
| Comments |
| Comment by Benjamin Eberlei [ 31/Jul/12 ] |
|
Fixed |
[DDC-1951] [GH-411] Added the new DBAL 2.3 types in the EntityGenerator typehint map Created: 27/Jul/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of stof: Url: https://github.com/doctrine/doctrine2/pull/411 Message: This fixes the generated typehint for these new types. @beberlei please backport it in 2.3 too |
| Comments |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
A related Github Pull-Request [GH-411] was closed |
[DDC-1946] [GH-409] added failing test for refresh with eager fetching Created: 26/Jul/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of schmittjoh: Url: https://github.com/doctrine/doctrine2/pull/409 Message: This is just a failing test case to demonstrate the problem. |
| Comments |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
A related Github Pull-Request [GH-409] was closed |
[DDC-1941] [GH-407] DDC-1939 - Removing references to non-existing AssociationMapping class Created: 24/Jul/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Ocramius: Url: https://github.com/doctrine/doctrine2/pull/407 Message: This fixes |
| Comments |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
A related Github Pull-Request [GH-407] was closed |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
Merged this PR |
[DDC-1939] Trying to save ManyToMany relatrionship Created: 23/Jul/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Jeremie Tom tom | Assignee: | Marco Pivetta |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
When i try to save a many to many relationship i have to following error Fatal error: Call to a member function getOwner() on a non-object in Doctrine/ORM/Persisters/ManyToManyPersister.php on line 181 It tries to call getOwner on the following array ($mapping) array(19) { [1] => array(6) { ["name"] => string(3) "uid" ["referencedColumnName"] => string(3) "uid" ["unique"] => bool(false) ["nullable"] => bool(true) ["onDelete"] => NULL ["columnDefinition"] => NULL } } } ["joinTableColumns"] => array(3) { [0] => string(13) "mch_accountid" [1] => string(3) "uid" [2] => string(10) "resourceid" }["relationToTargetKeyColumns"] => array(1) { ["resourceid"] => string(10) "resourceid" }} |
| Comments |
| Comment by Marco Pivetta [ 23/Jul/12 ] |
|
Can you try to replace your cache with an `ArrayCache` and see if the problem may come from there? |
| Comment by Jeremie Tom tom [ 23/Jul/12 ] |
|
I'm already using an ArrayCache for my cache. Also for my bootstrap I'm using this implementation of it : https://github.com/guilhermeblanco/ZendFramework1-Doctrine2. Here is how i interact with the collection. $collection->clear(); ... Later on ... $this->_em->persist($userAccount); |
| Comment by Jeremie Tom tom [ 24/Jul/12 ] |
|
I don't know if it helps but it works if I replace $mapping with $coll on line 181 : $sourceClass = $this->_em->getClassMetadata(get_class($mapping->getOwner())); Replaced by : $sourceClass = $this->_em->getClassMetadata(get_class($coll->getOwner())); |
| Comment by Marco Pivetta [ 24/Jul/12 ] |
|
Looks like code coming from the (removed) AssociationMapping class. The fix seems also to be valid. I'm patching this. |
| Comment by Marco Pivetta [ 24/Jul/12 ] |
|
Nevermind, I don't think this needs a test. It is just something overlooked during a refactoring. Being handled at |
| Comment by Marco Pivetta [ 24/Jul/12 ] |
|
Could you please provide the models anyway? It would be interesting to see why the test suite doesn't cover that part |
| Comment by Jeremie Tom tom [ 24/Jul/12 ] |
|
Ok I attached it. Tell me if you need more informations i didn't upload the full models. But just the parts i thought were relevant. |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
Fixed and applied to 2.2.3 and 2.3 |
[DDC-1937] [GH-405] Add possibility to cache annotations wih APC Created: 21/Jul/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of zim32: Url: https://github.com/doctrine/doctrine2/pull/405 Message: APC has a bug - after apc_fetch is made, arrays loose their cursors. That is why is_numeric(key(...)) is not working |
| Comments |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
A related Github Pull-Request [GH-405] was closed |
[DDC-1931] Cache $oid and $className through method calls in UoW internals Created: 17/Jul/12 Updated: 24/Jul/12 Resolved: 24/Jul/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Marco Pivetta | Assignee: | Marco Pivetta |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Description |
|
As suggested by Johannes Schmitt, calls in UoW can re-use $oid and $className by passing them to the various methods of UoW internals |
| Comments |
| Comment by Marco Pivetta [ 18/Jul/12 ] |
|
Performance gain is nearly 0... Not worth it as far as I've seen. |
[DDC-1925] Bug in UnitOfWork and ManyToMany relations Created: 14/Jul/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.1.8, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrew | Assignee: | Marco Pivetta |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
symfony2 |
||
| Description |
|
Lets say, I have entity Forum with ManyToMany relations with User. $uow = $this->getDoctrine() Unfortunately, whenever I try to change manyToMany relations - I got error If I comment uow code - everything works just great. It looks like bug in UnitOfWork implementation. Let me know if you need more details from me. |
| Comments |
| Comment by Marco Pivetta [ 16/Jul/12 ] |
|
What is the part you commented out? Also, in what context is your code executed? |
| Comment by Andrew [ 16/Jul/12 ] |
|
I got error when $em->persist($forum); $em->flush(); executed. I can create github repository with code, which reproduce this error, if you want. |
| Comment by Marco Pivetta [ 16/Jul/12 ] |
|
Please do |
| Comment by Andrew [ 16/Jul/12 ] |
|
that would be simple symfony2 application - will it work for you? |
| Comment by Marco Pivetta [ 16/Jul/12 ] |
|
As long as the code is related to doctrine. Otherwise this issue is quite incomplete |
| Comment by Andrew [ 16/Jul/12 ] |
|
Done, please check https://github.com/zhil/testDoctrine In few words, when I add code like before $em->persist(); $em->flush(); I got fake MYSQL error Thank in advance for your help |
| Comment by Andrew [ 19/Jul/12 ] |
|
Just wonder - is it bug in doctrine2 or its problems somewhere else? (symfony2/my code/ etc.) This is part of the live project - I need to fix it |
| Comment by Marco Pivetta [ 19/Jul/12 ] |
|
I think it is related with the fact that you're using the `UnitOfWork` manually. You can probably try to fix the problem by moving your code to an event subscriber until this is fixed. |
| Comment by Andrew [ 19/Jul/12 ] |
|
Well, I used UnitOfWork, because I need to know what was changed during object validation (for example, property status can be changed only in predefined cases etc.). Ok, thanks for the suggestion - I will implement some temporary solution for this problem |
| Comment by Marco Pivetta [ 19/Jul/12 ] |
|
I think I spotted where this happens, but I don't have a clear overview on the situation. Will try to work on this... |
| Comment by Andrew [ 19/Jul/12 ] |
|
Thanks for the checking this issue. entity { } and validator if(($object->previousStatusBugfix !=
|
| Comment by Marco Pivetta [ 19/Jul/12 ] |
|
I just wrote a couple of tests (attaching them to the issue shortly) and found out that on `>=2.2.x` your code runs perfectly. Now looking if it can be merged into `2.1.x` since it doesn't seem to cause any BC break. |
| Comment by Benjamin Eberlei [ 19/Jul/12 ] |
|
A related Github Pull-Request [GH-402] was opened |
| Comment by Benjamin Eberlei [ 19/Jul/12 ] |
|
A related Github Pull-Request [GH-403] was opened |
| Comment by Marco Pivetta [ 19/Jul/12 ] |
|
Duplicate of |
| Comment by Benjamin Eberlei [ 23/Jul/12 ] |
|
A related Github Pull-Request [GH-403] was closed |
| Comment by Benjamin Eberlei [ 29/Jul/12 ] |
|
A related Github Pull-Request [GH-402] was closed |
[DDC-1919] Doctrine fails to escape entity with reserved name in various situations Created: 10/Jul/12 Updated: 19/Jul/12 Resolved: 11/Jul/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3, Git Master |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Klaus Silveira | Assignee: | Benjamin Eberlei |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MySQL |
||
| Description |
|
I have submitted a PR here, fixing part of this issue: https://github.com/doctrine/dbal/pull/166 However, it fails when UPDATE or INSERT is used. I'm using a very simple, and common, entity name: Group. Doctrine is failing to escape this in various situations, causing queries to fail in MySQL due to reserved keywords. |
| Comments |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
Can you try using the quoting strategy in master? By defining an '@Table(name="`Group`")' on your entity you should be able to fix this issue by yourself... Anyway, this is only available in latest master. |
| Comment by Klaus Silveira [ 11/Jul/12 ] |
|
That hack, of course, fixes the problem. However, Doctrine is failing to escape entities with reserved keywords in various different situations and this should be a major problem, specially since there are many keywords that are common table names. Having to change the table name or escape the table name manually is not the best solution. I have look through the code but could not find out why getQuotedTableName() is failing to quote the table name "Group". I fixed the other problem, involving schema creation, but this one i couldn't fix. That's why i'm opening the issue, hoping someone with more experience in the ORM codebase manages to fix it. |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
Klaus Silveira, doctrine won't quote (at least with the default strategy) a table called "Group". The default strategy will look for the sorrounding "`" ("`Group`"). |
| Comment by Klaus Silveira [ 11/Jul/12 ] |
|
The failure is caused when querying anything related to an entity wich it's name is a reserved keyword, for example, an entity called "Group". I expected Doctrine to quote such table names. |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
Klaus Silveira did you put an @Table(name="`Group`") in it? |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
Please note that Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml @Table(name="Group")
and Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml @Table(name="`Group`")
are quite different. That's why I'm asking |
| Comment by Klaus Silveira [ 11/Jul/12 ] |
|
As i said, that hack fixes the problem. But i don't believe that having to change the table name or escape the table name manually is the best solution. Doctrine should be doing that transparently, as it does for other situations (such as during schema creation). Why not during all other operations? Makes no sense at all. |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
This is not a hack... In ORM, "`" is not the MySQL identifier quote. It is exactly thought as a character with which you tell the ORM that the identifier should be quoted. |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
Also, we won't collect the SQL reserved keywords, nor we can know what keywords are used in all vendors. The patch for the quoting strategy was exactly thought to allow end users to use insecure names for their objects/fields/indexes/etc but without having the ORM implement those checks for them (since it would just be messy and too "magic"). Please also reconsider your pull request on github too ( I'm closing this one |
| Comment by Klaus Silveira [ 11/Jul/12 ] |
|
Then what's the purpose of Doctrine\DBAL\Platforms\Keywords\MySQLKeywords? |
| Comment by Marco Pivetta [ 11/Jul/12 ] |
|
Klaus Silveira not sure, but it isn't used in ORM. |
| Comment by Benjamin Eberlei [ 19/Jul/12 ] |
|
A related Github Pull-Request [GH-166] was closed |
[DDC-1917] [GH-397] Cleanup/removing deprecated metadata drivers Created: 10/Jul/12 Updated: 12/Jul/12 Resolved: 12/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Ocramius: Url: https://github.com/doctrine/doctrine2/pull/397 Message: Removing deprecated drivers that are already available in Doctrine\Common. [](http://travis-ci.org/Ocramius/doctrine2) |
| Comments |
| Comment by Benjamin Eberlei [ 12/Jul/12 ] |
|
A related Github Pull-Request [GH-397] was closed |
[DDC-1915] [GH-396] DDC-1893 - Updating configuration to reflect latest Doctrine Common changes Created: 08/Jul/12 Updated: 11/Jul/12 Resolved: 08/Jul/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Marco Pivetta |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Ocramius: Url: https://github.com/doctrine/doctrine2/pull/396 Message: This PR fixes The `getDefaultAnnotationDriver` method was changes to stop supporting older incompatible Doctrine Common versions in favour of the newer logic. Also, changing logic so that the SimpleAnnotationReader is no more the The CS fixes that were additionally implemented (along with other minor changes |
| Comments |
| Comment by Benjamin Eberlei [ 08/Jul/12 ] |
|
A related Github Pull-Request [GH-396] was closed |
[DDC-1912] [GH-393] Updated the classmetadata factory for Common 2.3 Created: 06/Jul/12 Updated: 07/Jul/12 Resolved: 07/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of stof: Url: https://github.com/doctrine/doctrine2/pull/393 Message: This adds the new method introduced in doctrine/common#162 |
| Comments |
| Comment by Benjamin Eberlei [ 07/Jul/12 ] |
|
A related Github Pull-Request [GH-393] was closed |
[DDC-1911] [GH-392] Replaced a shallow-copy with a deep-copy to avoid side effects. Created: 06/Jul/12 Updated: 08/Jul/12 Resolved: 08/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of egeloen: Url: https://github.com/doctrine/doctrine2/pull/392 Message: Hey! I'm currently using Symfony 2.1 + Doctrine master branch + Pager fanta master branch. I'm facing a very vicious issue. The doctrine paginator is able to clone a query with his `cloneQuery` method. This method will only clone the query without this parameters & hints. The issue is the parameters is setted with the `setParameters` method which will only affect the ArrayCollection reference to the new query builder and so, shared the reference between the two queries. This PR will make a deep-copy of the ArrayCollection instead of a simple shallow-copy. I'm not sure if this fix is the best solution. Let me know if you need more information. |
| Comments |
| Comment by Benjamin Eberlei [ 08/Jul/12 ] |
|
A related Github Pull-Request [GH-392] was closed |
[DDC-1904] [GH-388] Added an empty line feed preceding the return statement Created: 03/Jul/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of fixe: Url: https://github.com/doctrine/doctrine2/pull/388 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 03/Jul/12 ] |
|
A related Github Pull-Request [GH-388] was closed |
[DDC-1902] [GH-387] fixed typo in command help text Created: 02/Jul/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of shieldo: Url: https://github.com/doctrine/doctrine2/pull/387 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 02/Jul/12 ] |
|
A related Github Pull-Request [GH-387] was closed |
[DDC-1900] Impossibility to override built-in SQL functions Created: 30/Jun/12 Updated: 05/Jul/12 Resolved: 05/Jul/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Alex Oroshchuk | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Any |
||
| Description |
|
Doctrine doesn't allow to to create own SQL function for DQL if that function is already defined as "built-in". An example could be custom DATE_ADD implementation. |
| Comments |
| Comment by Benjamin Eberlei [ 04/Jul/12 ] |
|
Just name the method differently. |
| Comment by Alex Oroshchuk [ 05/Jul/12 ] |
|
To rename the method one has to KNOW that he has to rename it, i.e. to know about this issue. As to the renaming: is it ok to go and edit source code (change class name at least) provided by someone else and then merge all the sources when new releases appear? I re-open the issue in order to attract more attention, but you are free to decide how to treat it. Hope you'll find the best solution. A short line in documentation could notify about current limitations and save hours for people |
| Comment by Benjamin Eberlei [ 05/Jul/12 ] |
|
Printing statements in bold isnt helpful. This is open-source. However, you are right that this could be more user-friendly. Its now throwing an exception when an internal function is attempted to be overwritten. |
[DDC-1897] [GH-384] [DDC-1885] Fix quotes in many to many persisters Created: 27/Jun/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/384 Message: http://www.doctrine-project.org/jira/browse/DDC-1885 |
| Comments |
| Comment by Benjamin Eberlei [ 04/Jul/12 ] |
|
A related Github Pull-Request [GH-384] was closed |
[DDC-1895] update an entity with an ID column which is a relation instead of a normal field Created: 27/Jun/12 Updated: 05/Jul/12 Resolved: 05/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Bart van den Burg | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I got this error when trying to update an entity with an ID column which is a relation instead of a normal field: https://gist.github.com/3399c0ad5e0a44a29f98 Here is the relevant mapping: <?php
namespace Roompot\TRSBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Samson\Bundle\TRSBundle\Entity\Registrar;
/**
* @ORM\Entity
*/
class RegistrarDepartmentMapping
{
/**
* @ORM\ManyToOne(targetEntity="RoompotRegistrar")
* @ORM\JoinColumn(referencedColumnName="person_id")
* @ORM\Id
*/
private $registrar;
/**
* @ORM\ManyToOne(targetEntity="Department")
* @ORM\Id
*/
private $department;
/**
* @ORM\Column(type="boolean")
*/
private $head = false;
public function getRegistrar()
{
return $this->registrar;
}
public function setRegistrar(Registrar $registrar)
{
if (null !== $this->registrar) {
throw new \RuntimeException('Cannot change registrar! Remove this entity and create a new one');
}
$this->registrar = $registrar;
}
public function getDepartment()
{
if (null !== $this->registrar) {
throw new \RuntimeException('Cannot change department! Remove this entity and create a new one');
}
return $this->department;
}
public function setDepartment(Department $department)
{
$this->department = $department;
}
public function isHead()
{
return $this->head;
}
public function setHead($head)
{
$this->head = $head;
}
}
<?php
namespace Roompot\TRSBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Samson\Bundle\TRSBundle\Entity\Registrar;
/**
* @ORM\Entity
*/
class RoompotRegistrar extends Registrar
{
[...]
}
<?php namespace Samson\Bundle\TRSBundle\Entity; use Samson\Bundle\AddressBookBundle\Entity\Person; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\InheritanceType("SINGLE_TABLE") * @ORM\DiscriminatorColumn(name="discr", type="string") */ abstract class Registrar { /** * @ORM\Id * @ORM\OneToOne(targetEntity="Samson\Bundle\AddressBookBundle\Entity\Person", cascade={"persist"}) * @ORM\JoinColumn(nullable=false, onDelete="CASCADE") */ private $person; [...] } <?php namespace Samson\Bundle\AddressBookBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="Samson\Bundle\AddressBookBundle\Entity\PersonRepository") */ class Person implements [...] { /** * @ORM\Column(type="integer") * @ORM\Id * @ORM\GeneratedValue */ private $id; [...] } I was able to fix the error by updating BasicEntityPersister: https://github.com/SamsonIT/doctrine2/compare/fetching_id_column_if_relation |
| Comments |
| Comment by Benjamin Eberlei [ 05/Jul/12 ] |
|
Fixed |
[DDC-1893] Doctrine\ORM\Mapping\Driver\AnnotationDriver::create() not updated for new annotation readers Created: 26/Jun/12 Updated: 08/Jul/12 Resolved: 08/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vašek Purchart | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
After refactoring of annotation readers, there are new defaults and the current implementation calls undefined method, because Doctrine\Common\Annotations\AnnotationReader has been refactored too. The new way should be probably requiring Doctrine\Common\Annotations\Reader interface as $reader parameter and if not present constructing the default as in Doctrine\ORM\Configuration::create : AnnotationRegistry::registerFile(_DIR_ . '/Mapping/Driver/DoctrineAnnotations.php'); $reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader(); |
| Comments |
| Comment by Marco Pivetta [ 06/Jul/12 ] |
|
Looking into this today |
| Comment by Benjamin Eberlei [ 06/Jul/12 ] |
|
$config->newDefaultAnnotationDriver should have a flag for picking the simple or the "ORM |
| Comment by Marco Pivetta [ 08/Jul/12 ] |
|
Handled in |
[DDC-1885] Problem with column quoting on Delete Created: 20/Jun/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1.6 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Ignacio Larranaga | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
delete($entity) from BasicEntityPersiter is not considering that the columns might be quoted. public function delete($entity) { $identifier = $this->_em->getUnitOfWork()->getEntityIdentifier($entity); $this->deleteJoinTableRecords($identifier); $id = array_combine($this->_class->getIdentifierColumnNames(), $identifier); $this->_conn->delete($this->_class->getQuotedTableName($this->_platform), $id); } The third line: $id = array_combine($this->_class->getIdentifierColumnNames(), $identifier); // might be fixed in this way (as example): foreach ($identifier as $columnName => $value) { $id[$this->_class->getQuotedColumnName($columnName, $this->_platform)] = $value; } |
| Comments |
| Comment by Fabio B. Silva [ 20/Jun/12 ] |
|
code format |
| Comment by Fabio B. Silva [ 20/Jun/12 ] |
|
Hi Ignacio, I think it will be fixed by : Anyway could you attach a test case for this one please ? |
| Comment by Ignacio Larranaga [ 25/Jun/12 ] |
|
Hi Fabio, sorry I doesn't have a test case written |
| Comment by Fabio B. Silva [ 25/Jun/12 ] |
|
Hi Ignacio, No problem, could you attach your entities ? Thanks |
| Comment by Ignacio Larranaga [ 25/Jun/12 ] |
|
User and Role, and I was just adding a role and updateing. |
| Comment by Fabio B. Silva [ 26/Jun/12 ] |
|
Thanks Ignacio, I'm working on this problem. |
| Comment by Fabio B. Silva [ 04/Jul/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/4bfdcd32f7548c628fc393e36bf37ef8b97a80a8 |
[DDC-1883] [GH-380] remove svn markers Created: 19/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/380 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 19/Jun/12 ] |
|
A related Github Pull-Request [GH-380] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1881] [GH-379] Fix join-poc merge Created: 18/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/379 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 18/Jun/12 ] |
|
A related Github Pull-Request [GH-379] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
Fixed |
[DDC-1880] Named Queries not processed correctly in XML Created: 18/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Josiah | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When attempting to define named queries in XML mapping, they are not correctly passed through to the ClassMetadataInfo instance. This is because the attribute syntax ($xmlRoot['named-queries']) is used instead of the child element syntax ({{$xmlRoot-> {'named-queries'}}}). |
| Comments |
| Comment by Josiah [ 18/Jun/12 ] |
|
Added a PR for this issue https://github.com/doctrine/doctrine2/pull/378 |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
As per GitHub resolution |
[DDC-1878] [GH-377] Fix the documentation link in the README Created: 18/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Dinduks: Url: https://github.com/doctrine/doctrine2/pull/377 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 18/Jun/12 ] |
|
A related Github Pull-Request [GH-377] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1877] [GH-376] De-deprecate transaction handling methods Created: 16/Jun/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of lstrojny: Url: https://github.com/doctrine/doctrine2/pull/376 Message: As discussed with @beberlei over IRC, deprecating transaction handling methods make the API cleaner but testing of Entity Manager dependent components much messier. Also suggesting to use `$em->getConnection()->beginTransaction()` feels like a violation of the law of demeter. Therefore this pull request would remove the deprecation warnings from `EntityManager::beginTransaction()`, `EntityManager::commit()`, `EntityManager::rollback()`. |
[DDC-1876] [GH-375] Allow passing any callable instead of only closures Created: 16/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of lstrojny: Url: https://github.com/doctrine/doctrine2/pull/375 Message: This patch allows passing any callable to transactional(), not just closures. |
| Comments |
| Comment by Benjamin Eberlei [ 18/Jun/12 ] |
|
A related Github Pull-Request [GH-375] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1873] [GH-373] Grammar fix for composer.json file Created: 12/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of bschaeffer: Url: https://github.com/doctrine/doctrine2/pull/373 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 13/Jun/12 ] |
|
A related Github Pull-Request [GH-373] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1870] [GH-372] [DDC-1845] QuoteStrategy Created: 12/Jun/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/372 Message:
http://www.doctrine-project.org/jira/browse/DDC-1845 This patch fix some quote problems using a default quote strategy and allows users find solutions themselves for weird quote cases. This DBAL PR shoud be merged to fix sqlite tests in : https://github.com/doctrine/dbal/pull/158 There is a lote of new method calls, the performance tests in sqlite are the following :
. Time: 19 seconds, Memory: 261.50Mb ```
. Time: 19 seconds, Memory: 260.50Mb |
| Comments |
| Comment by Benjamin Eberlei [ 25/Jun/12 ] |
|
A related Github Pull-Request [GH-372] was closed |
[DDC-1869] [GH-371] set permissions as expected by composer.phar update Created: 11/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of robocoder: Url: https://github.com/doctrine/doctrine2/pull/371 Message: I'm guessing the executable permissions were removed from these files recently. composer.json copies the following scripts (i.e., "bin": ["bin/doctrine", "bin/doctrine.php"], ) to the vendor/bin folder. When running composer.phar update, and doctrine/orm is to be updated, composer fails because these two scripts have been chmod'd to be executable. |
| Comments |
| Comment by Benjamin Eberlei [ 15/Jun/12 ] |
|
A related Github Pull-Request [GH-371] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1868] [GH-370] Some PHP-CS fixes Created: 11/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Ph3nol: Url: https://github.com/doctrine/doctrine2/pull/370 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 15/Jun/12 ] |
|
A related Github Pull-Request [GH-370] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1866] [GH-369] Show the advice only when relevant. Created: 10/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of greg0ire: Url: https://github.com/doctrine/doctrine2/pull/369 Message: This is indeed a good advice, but people who |
| Comments |
| Comment by Benjamin Eberlei [ 18/Jun/12 ] |
|
A related Github Pull-Request [GH-369] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1865] [GH-368] Join poc Created: 10/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of guilhermeblanco: Url: https://github.com/doctrine/doctrine2/pull/368 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 18/Jun/12 ] |
|
A related Github Pull-Request [GH-368] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1862] [GH-365] DDC-1860 - Composer arbitrary for CLI and composer/autoload.php in different paths Created: 09/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Ocramius: Url: https://github.com/doctrine/doctrine2/pull/365 Message: DDC-1860 - Composer became a requirement to run CLI some time ago. This patch: 1. Makes composer optional if the user defines his own autoloaders in `cli-config.php` |
| Comments |
| Comment by Benjamin Eberlei [ 09/Jun/12 ] |
|
A related Github Pull-Request [GH-365] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1855] [GH-363] Entities generator: constructor's template docblock Created: 06/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of gajdaw: Url: https://github.com/doctrine/doctrine2/pull/363 Message: Missing constructor's docblock. |
| Comments |
| Comment by Benjamin Eberlei [ 15/Jun/12 ] |
|
A related Github Pull-Request [GH-363] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1854] [GH-362] Correct some mistakes (tabs & trailing spaces) Created: 05/Jun/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of odolbeau: Url: https://github.com/doctrine/doctrine2/pull/362 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 15/Jun/12 ] |
|
A related Github Pull-Request [GH-362] was closed |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
PR was merged. |
[DDC-1849] Paginator: The Parameter Types are not set in Function cloneQuery Created: 31/May/12 Updated: 22/Jun/12 Resolved: 22/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Aline Blaser | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The Parameter-Types are not set in the Function cloneQuery in the Paginator-Class (Doctrine/ORM/Tools/Pagination/Paginator.php line 172): $cloneQuery->setParameters($query->getParameters()); But it should be: $cloneQuery->setParameters($query->getParameters(), $query->getParameterTypes()); |
| Comments |
| Comment by Marco Pivetta [ 10/Jun/12 ] |
|
Could you try to use latest master? This should already be solved as now parameters are instances of `Doctrine\ORM\Query\Parameter`, which also means that they enclose their type |
| Comment by Guilherme Blanco [ 22/Jun/12 ] |
|
Fixed in master |
[DDC-1848] "QueryException: Invalid parameter number: number of bound variables does not match number of tokens" with "dev-master" of Doctrine\ORM + Pagerfanta. Created: 30/May/12 Updated: 08/Jul/12 Resolved: 08/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Paweł Jędrzejewski | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Description |
|
Using Symfony2 master with Doctrine\ORM master & Pagerfanta paginator (which uses Doctrine paginator internally) causes this exception. "QueryException: Invalid parameter number: number of bound variables does not match number of tokens". Works fine with the master of Symfony & same version of Pagerfanta, but with 2.2 of Doctrine ORM. Full app to see it is available here: http://github.com/Sylius/Sylius-Sandbox. Full trace (without twig and Symfony part) [1/2] QueryException: Invalid parameter number: number of bound variables does not match number of tokens |
| Comments |
| Comment by Саша Стаменковић [ 31/May/12 ] |
|
I tested Sylius against this issue with each commit from doctrine master branch, and I find out that bug appeared in this https://github.com/doctrine/doctrine2/commit/1635e0af4b06ef3015205563b59b505ae3fac69d commit. |
| Comment by Marco Pivetta [ 08/Jul/12 ] |
|
Could you check if this isn't the same problem reported at DDC-1803? |
| Comment by Benjamin Eberlei [ 08/Jul/12 ] |
|
Fixed |
[DDC-1845] Implements a QuoteStrategy to fix quote problems Created: 28/May/12 Updated: 25/Jun/12 Resolved: 25/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Fabio B. Silva | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
As discussed to fix http://www.doctrine-project.org/jira/browse/DDC-1719 The QuoteStrategy should implements methods like : function getColumnName($fieldName, ClassMetadata $class)
function getTableName(ClassMetadata $class)
function getJoinTableName($relation, ClassMetadata $class)
function getIdentifierColumnNames(ClassMetadata $class)
function getColumnAlias($columnName, $counter, ClassMetadata $class = null)
All current quotes will be replaced by one default QuoteStrategy. Related Tickets : http://www.doctrine-project.org/jira/browse/DDC-1719 |
| Comments |
| Comment by Fabio B. Silva [ 25/Jun/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/cb72219b118c158c9b5344c4b81ff2b1a9149ab0 |
[DDC-1843] CLONE -Join columns can't be quoted Created: 28/May/12 Updated: 15/Aug/12 Resolved: 15/Aug/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1.6 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Marc Easen | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Join columns can't be quoted like columns using name="`quoted`". Using annotation driver. /** * @ORM\Table( * name="`category`", * indexes={ * @ORM\Index( * name="fk_category_parentId", * columns={"parentId"} * ) * }, * uniqueConstraints={ * @ORM\UniqueConstraint( * name="uq_category_nameParentId", * columns={"name", "parentId"} * ) * } * ) */ class Category { /** * @ORM\Id * @ORM\Column(type="smallint", name="`id`") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(type="smallint", name="`parentId`", nullable=true) */ protected $parentId; /** * @ORM\Column(type="string", length=50, name="`name`") */ protected $name; /** * @ORM\ManyToOne(targetEntity="Category", inversedBy="categories") * @ORM\JoinColumn(name="parentId", referencedColumnName="id", onDelete="CASCADE", onUpdate="NO ACTION") */ protected $category; } ... public function load(ObjectManager $manager) { $parent = new Category(); $parent->setName('parent'); $manager->persist($parent); $manager->flush(); $child = new Category(); $child->setName('parent'); $child->setParentId($parent->getId()); $child->setCategory($parent); $manager->persist($child); $manager->flush(); } Result: Invalid parameter number: number of bound variables does not match number of tokens |
| Comments |
| Comment by Fabio B. Silva [ 28/May/12 ] |
|
code format |
| Comment by Fabio B. Silva [ 25/Jun/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/cb72219b118c158c9b5344c4b81ff2b1a9149ab0 |
| Comment by Marc Easen [ 05/Jul/12 ] |
|
When inserting into an entity which has quoted columns and unquoted JoinColumn the generated SQL includes the correct number of parameters but the incorrect columns names and bind parameters: INSERT INTO `table` (`c1`, c1) VALUES (?, ?) |
| Comment by Marc Easen [ 05/Jul/12 ] |
| Comment by Fabio B. Silva [ 05/Jul/12 ] |
|
Hi Marc, Could you attach your entities or a test case please ? Thanks |
| Comment by Fabio B. Silva [ 05/Jul/12 ] |
|
Marc, why do you need to quoted columns and unquoted join column ? For sure duplicated columns is a problem, but your use case does not make sense for me.. |
| Comment by Fabio B. Silva [ 15/Aug/12 ] |
|
More details about the related problem : https://github.com/doctrine/doctrine2/pull/390 |
[DDC-1839] [GH-358] Update license for Composer Created: 26/May/12 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of jalliot: Url: https://github.com/doctrine/doctrine2/pull/358 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 26/May/12 ] |
|
A related Github Pull-Request [GH-358] was closed |
[DDC-1831] Problem while implement a relation many to many with columns names starting with caps Created: 21/May/12 Updated: 06/Jul/12 Resolved: 06/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Pablo Minetti | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Hi, In my team we are implementing a solution that involves make a relation many to many. The problem is that the columns names of the middle table start with caps. we make correction to ORM to solve this problem. I attach to you the files modify. |
| Comments |
| Comment by Fabio B. Silva [ 05/Jun/12 ] |
|
Hi Pablo, I'm working on a quote patch right now. Could you attach a test for this case please ? |
| Comment by Benjamin Eberlei [ 05/Jul/12 ] |
|
Fabio, any stats on this one? Is it fixed through your change? |
| Comment by Fabio B. Silva [ 05/Jul/12 ] |
|
There is no answers from Pablo, I think this is fixed by quote strategy, also if we don't get any feedback from Pablo, I think both could be closed. |
| Comment by Benjamin Eberlei [ 06/Jul/12 ] |
|
No feeback given and a fix was pushed to master. Please reopen if problems persist with master + custom quoting strategy. |
[DDC-1827] [GH-350] Added the branch-alias in the composer.json Created: 20/May/12 Updated: 22/May/12 Resolved: 22/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of stof: Url: https://github.com/doctrine/doctrine2/pull/350 Message: depends on doctrine/dbal#151 |
| Comments |
| Comment by Benjamin Eberlei [ 20/May/12 ] |
|
A related Github Pull-Request [GH-350] was closed |
[DDC-1826] [GH-349] Fix DDC-1822 Created: 19/May/12 Updated: 22/May/12 Resolved: 22/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/349 Message: http://www.doctrine-project.org/jira/browse/DDC-1822 |
| Comments |
| Comment by Benjamin Eberlei [ 20/May/12 ] |
|
A related Github Pull-Request [GH-349] was closed |
[DDC-1823] Error with IN and UPPER in the same line Created: 17/May/12 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | 2.1.6 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Aitor Suso | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have a problem making a DQL query
:values is an array of possible names of brands. The error shown is
|
| Comments |
| Comment by Guilherme Blanco [ 27/May/12 ] |
|
This is already fixed in master for a long time and should be available in 2.3, since it requires major changes in DQL. |
[DDC-1822] Intermediary parent for NoResult and NonUnique Exceptions Created: 16/May/12 Updated: 20/May/12 Resolved: 20/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Rafael Dohms | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I would like to propose a intermediary parent for the NoResult and NonUnique Exceptions, that is not as high level as ORMEXception, something in between. The reasoning for this is that sometime si want to get a single object out of the DB, and in case its not there i want to just get a null and carry on. For this I usually need to catch both exceptions as both results might trigger me to do something else, like abort. In some cases i do need to treat each of these in its own way, but in some cases it does not matter to which side the error went, it only matters that its not the expected SingleResult. Catching a ORMException is not adequate as it may include other error which would need to be treated differently. My proposal would be like: ORMException -> NotExpectedResultException -> {NoResult, NonUnique}Just a more detailed grouping of exceptions. Does this sound like something possible, or am I just nuts? |
| Comments |
| Comment by Guilherme Blanco [ 20/May/12 ] |
|
Fixed in https://github.com/doctrine/doctrine2/commit/3d8e46447a4fa8871bd268e8ad69820c636e0dea |
[DDC-1808] [GH-345] Fixed DDC-1802 Created: 02/May/12 Updated: 04/May/12 Resolved: 04/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of hason: Url: https://github.com/doctrine/doctrine2/pull/345 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 04/May/12 ] |
|
A related Github Pull-Request [GH-345] was closed |
[DDC-1807] [GH-344] Composer modify Created: 02/May/12 Updated: 22/May/12 Resolved: 22/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Hounddog: Url: https://github.com/doctrine/doctrine2/pull/344 Message: Included Bin file into composer |
[DDC-1802] DQL parser issue when using FunctionsReturningStrings(...) NOT LIKE Created: 30/Apr/12 Updated: 04/May/12 Resolved: 04/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2-BETA1, 2.2-BETA2, 2.2.0-RC1, 2.2, 2.2.1, 2.2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Critical |
| Reporter: | Martin Hasoň | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If you create a query like the following, you will get an exception: $em->createQuery( "SELECT e FROM MyEntity e WHERE CONCAT(e.name, e.name2) NOT LIKE '%abc%'" ); The variable $token['type'] is Lexer::T_NOT - https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query/Parser.php#L2238 |
| Comments |
| Comment by Alexander [ 04/May/12 ] |
[DDC-1800] Paginator results is wrong if your query use order by clause Created: 27/Apr/12 Updated: 09/Apr/13 Resolved: 29/Aug/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | 2.2.4, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Marc Drolet | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
linux oracle |
||
| Description |
|
NOTE: I didn't try this on other database, I'm using Oracle. if my original fetchJoin query use an order by clause, the results is not keeping the provided order by clause and re-order them by id. here is my generated query to get the distinct records that get generated: SELECT distinct ID0 running this query I get the id 30, 44 when the inner query return 44, 30 here is the query that should get generated to take care of the order by clause: To fix this on the Paginator code: file: ORM/Tools/Pagination/LimitSubqueryOutputWalker.php change: for: |
| Comments |
| Comment by Marc Drolet [ 14/May/12 ] |
|
rownum instead of numrow. sorry. $sql = sprintf('SELECT b.*, rownum as rn FROM (SELECT DISTINCT %s, rownum FROM (%s) ORDER BY rownum ASC) b', |
| Comment by Benjamin Eberlei [ 07/Jul/12 ] |
|
Doctrine 2.2.2 doesnt have the LimitSubqueryoutputWalker and Doctrine 2.3-dev does not have the line in the code. Can you make a more explicit statement of where the change is necessary? |
| Comment by Marc Drolet [ 09/Jul/12 ] |
|
It's in the Pagination of version 2.2.2. ORM/Tools/Pagination/LimitSubqueryOutputWalker.php |
| Comment by Benjamin Eberlei [ 09/Jul/12 ] |
|
This is the 2.2 branch, https://github.com/doctrine/doctrine2/tree/2.2/lib/Doctrine/ORM/Tools/Pagination and https://github.com/doctrine/doctrine2/tree/2.2.2/lib/Doctrine/ORM/Tools/Pagination is the 2.2.2 tag. no LimitSubqueryOutputWalker.php in there. |
| Comment by Benjamin Eberlei [ 29/Aug/12 ] |
|
Fixed |
| Comment by Raymond Kolbe [ 09/Apr/13 ] |
|
This issue is popping it's head up again! Benjamin, your tests don't test for the ordering problem unless those tests are happening somewhere else? https://github.com/doctrine/doctrine2/commit/f55b5411c8b1f75bf2b5cf5ffe4bc50034fb91cb I am performing a query as complex as Marc's and I experience the same exact issue. I have checked out today's latest master branch as well as the 2.3 tag with no change. Please advise. |
| Comment by Raymond Kolbe [ 09/Apr/13 ] |
|
I have a PR in https://github.com/doctrine/doctrine2/pull/645 |
[DDC-1798] [GH-342] Fix identifier generator strategy for composite identifier Created: 26/Apr/12 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of jeanmonod: Url: https://github.com/doctrine/doctrine2/pull/342 Message: When using the ConvertMappingCommand on a schema that contain a table with a composite key, we got the exception: Single id is not allowed on composite primary key in entity CollectionFields This can be fix by setting the identifier strategy to NONE for composite identifier fields |
| Comments |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
Fixed |
[DDC-1791] Paginator query doesn't work using Oracle Created: 19/Apr/12 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Marc Drolet | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
linux using an oracle database |
||
| Description |
|
Ive build a dql query using the queryBuilder and I've passed the queryBuilder to the Paginator object. The sql query failed. here is the sql query that get executed: SELECT a.* It seems that oracle doesn't accept the AS _dctrn_result. if I remove the AS _dctrn_result in the query, the query works and I get the proper information. |
| Comments |
| Comment by Marc Drolet [ 19/Apr/12 ] |
|
Here is the error message sent by oracle: Also, if I remove the keyword AS, and let the _dctrn_result, I get the error: So, If I remove the _ from the alias it work. |
| Comment by Marc Drolet [ 19/Apr/12 ] |
|
here is the fix I've done on my local environment: ORM/Tools/Pagination/LimitSubqueryOutputWalker.php line 126 I've remove the AS _dctrn_result alias from the query. I've grep for dctrn_result into the ORM directory and I didn't find any occurence of dctrn_result, so it's not used anywhere. |
| Comment by Marc Drolet [ 19/Apr/12 ] |
|
I would also point out the the result that I get is not correct when we use an order by clause. To get the correct result when an order by clause is provided, I need to add another level of query. SELECT a.* |
| Comment by Marc Drolet [ 19/Apr/12 ] |
|
I've fix the limit order by issue (for oracle only) here is the change I've made to the file: ORM/Tools/Pagination/LimitSubqueryOutputWalker.php I've replace this code: for this one: else { $sql = 'SELECT a.* FROM (' . $sql . ') a WHERE a.rn <= ' . $this->maxResults; } |
| Comment by Marc Drolet [ 23/Apr/12 ] |
|
The countOutputWalker also need to be modified. file: Doctrine/ORM/Tools/Pagination/CountOutputWalker.php for oracle it doesn't work: need to be changed for: I want to point out the I've change the alias to UPPER CASE, cause oracle return the array result with field names in upper case. file: Doctrine/ORM/Tools/Pagination/Paginator.php |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
Fixed, you are not using 2.2.2 btw, this code is only in master. |
[DDC-1784] Error on generate entities: 'Attribute "allocationSize" of @ORM\SequenceGenerator' Created: 18/Apr/12 Updated: 27/May/12 Resolved: 20/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Augusto Ximenes de Souza | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When I generated my entities on version 2.2.2 through "orm:convert-mapping", the sequence has a value ' allocationSize="1", initialValue="1" ' with quotes. So I received an error: Attribute "allocationSize" of @ORM\SequenceGenerator declared on property entities\Test::$id expects a To fix, I removed the quotes. is It a bug? Part of entity generated: /**
|
| Comments |
| Comment by Augusto Ximenes de Souza [ 18/Apr/12 ] |
|
I think the problem is on the line 1037 to 1042 of Class Doctrine \ ORM \ Tools \ EntityGenerator: if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) { $sequenceGenerator[] = 'allocationSize="' . $metadata->sequenceGeneratorDefinition['allocationSize'] . '"'; }if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) { $sequenceGenerator[] = 'initialValue="' . $metadata->sequenceGeneratorDefinition['initialValue'] . '"'; }Replace to: if (isset($metadata->sequenceGeneratorDefinition['allocationSize'])) { $sequenceGenerator[] = 'allocationSize=' . $metadata->sequenceGeneratorDefinition['allocationSize']; }if (isset($metadata->sequenceGeneratorDefinition['initialValue'])) { $sequenceGenerator[] = 'initialValue=' . $metadata->sequenceGeneratorDefinition['initialValue']; } |
| Comment by Fabio B. Silva [ 20/Apr/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/d5d47222c1dc5ea97ebd8f4c68834fbe4abeb238 |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
Merged into 2.2 |
[DDC-1781] [GH-337] Removed dependency on common as required by dbal anyway Created: 17/Apr/12 Updated: 17/Apr/12 Resolved: 17/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of richardmiller: Url: https://github.com/doctrine/doctrine2/pull/337 Message: Not sure if this is the way to resolve this problem or not but I just tried to install dev-master using composer, doctrine/dbal and doctrine/common are both required in the "dev-master" versions but doctrine/dbal requires doctrine/common: >=2.2.0,<=2.2.99 which causes a conflict. Removing the dependency on doctrine/common would allow doctrine/dbal to install the version it requires. If this is not an ok solution then is there an alternative one? |
| Comments |
| Comment by Benjamin Eberlei [ 17/Apr/12 ] |
|
A related Github Pull-Request [GH-337] was closed |
[DDC-1768] [GH-330] improved exception message Created: 05/Apr/12 Updated: 04/May/12 Resolved: 04/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of schmittjoh: Url: https://github.com/doctrine/doctrine2/pull/330 Message: This makes the exception message more helpful. Before you were basically searching a needle in a haystack. Note that I haven't been able to run the tests because I don't have PHPUnit 3.6 atm, so please check before merging. |
| Comments |
| Comment by Benjamin Eberlei [ 06/Apr/12 ] |
|
A related Github Pull-Request [GH-330] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-330] was synchronize |
[DDC-1766] Reintroduce old result cache as hydration cache Created: 04/Apr/12 Updated: 07/Apr/12 Resolved: 07/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.2, 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The old result cache should be reintroduced as hydration cache, since it obviously is much faster than just result caching by avoiding hydration. $users = $this->_em->createQuery($dql) ->setHydrationCacheProfile(new QueryCacheProfile(null, null, $cache)) ->getResult(); |
| Comments |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
Implemented Hydration Cache. |
[DDC-1764] [GH-326] 2.1.x setDiscriminatorMap fix Created: 04/Apr/12 Updated: 07/Apr/12 Resolved: 07/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.7, 2.2.2, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of smatyas: Url: https://github.com/doctrine/doctrine2/pull/326 Message: Fixing a bug when calling setDiscriminatorMap from multiple sources (ie: from Events::loadClassMetadata and annotation). http://www.doctrine-project.org/jira/browse/DDC-1763 |
| Comments |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-327] was opened |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-328] was opened |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-328] was synchronize |
| Comment by Benjamin Eberlei [ 06/Apr/12 ] |
|
A related Github Pull-Request [GH-328] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-327] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-328] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-327] was closed |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-328] was closed |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-326] was closed |
[DDC-1763] Fixing a bug when calling setDiscriminatorMap from multiple sources (ie: from Events::loadClassMetadata and annotation). Created: 04/Apr/12 Updated: 07/Apr/12 Resolved: 07/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1.6, 2.2, Git Master |
| Fix Version/s: | 2.1.7, 2.2.2, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Matyas Somfai | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Description |
|
We tried to set discriminator map in https://github.com/Netpositive/NetpositiveDiscriminatorMapBundle both from Events::loadClassMetadata and annotation. Pull request created on 2.1.x, 2.2, master branches. |
| Comments |
| Comment by Peter Buri [ 05/Apr/12 ] |
|
Pull requests: https://github.com/doctrine/doctrine2/pull/326 |
[DDC-1757] DQL exception when building query with multiple from and join parts Created: 03/Apr/12 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Aigars Gedroics | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Query builder creates bad DQL if multiple FROM and JOIN parts are used. As example such query builder code $qb->from('A', 'a')
->from('B', 'b')
->join('b.c', 'c')
->join('c.d', 'd');
will generate DQL ...
FROM A a
INNER JOIN c.d d,
B b
INNER JOIN b.c c
...
but should generate this instead ...
FROM A a,
B b
INNER JOIN b.c c
INNER JOIN c.d d
...
The DQL parser raises exception Doctrine\ORM\Query\QueryException: [Semantical Error] line 0, col 61 near '.d d, B': Error: Identification Variable c used in join path expression but was not defined before. |
| Comments |
| Comment by Aigars Gedroics [ 03/Apr/12 ] |
|
The test case attached. |
| Comment by Aigars Gedroics [ 03/Apr/12 ] |
|
Dirty patch attached. |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
This was fixed through a PR some weeks ago. |
[DDC-1752] [GH-321] Addition for new cache driver Created: 02/Apr/12 Updated: 07/Apr/12 Resolved: 07/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of import: Url: https://github.com/doctrine/doctrine2/pull/321 Message: New cache driver addition for Doctrine running in ```non-dev``` mode and cache driver is not set. |
| Comments |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-321] was synchronize |
| Comment by Benjamin Eberlei [ 06/Apr/12 ] |
|
A related Github Pull-Request [GH-321] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-321] was closed |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
Merged |
[DDC-1748] [GH-317] Fix DDC-1694 Created: 01/Apr/12 Updated: 05/May/12 Resolved: 05/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/317 Message: http://www.doctrine-project.org/jira/browse/DDC-1694 if I understand right Any way, for now I think this is a valid issue.. |
| Comments |
| Comment by Benjamin Eberlei [ 01/Apr/12 ] |
|
A related Github Pull-Request [GH-317] was synchronize |
| Comment by Benjamin Eberlei [ 01/Apr/12 ] |
|
A related Github Pull-Request [GH-317] was synchronize |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-317] was synchronize |
| Comment by Benjamin Eberlei [ 06/Apr/12 ] |
|
A related Github Pull-Request [GH-317] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-317] was synchronize |
[DDC-1746] Throw Exception when setting unknown cascade option Created: 01/Apr/12 Updated: 01/Apr/12 Resolved: 01/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
See |
| Comments |
| Comment by Benjamin Eberlei [ 01/Apr/12 ] |
|
Implemented |
[DDC-1743] [GH-315] [WIP] Allowing proxies to be passed to ORM public API Created: 31/Mar/12 Updated: 04/May/12 Resolved: 04/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of Ocramius: Url: https://github.com/doctrine/doctrine2/pull/315 Message: Basically, following happens: ```php Fortunately, just some replacements of `get_class($entity)` with `Doctrine\Common\Util\ClassUtils::getClass($entity)` fix the issue. I wanted to leave this as [WIP] because I need some feedback on the test cases. All three tests fail without the patch, while [](http://travis-ci.org/Ocramius/doctrine2) with it applied. What is a bit tricky is the status of the proxies. Cases where `$_initialized_ = false;` && `$_identifier = array();` and others fail because of notices and weird issues that are very difficult to hunt down. That is because of the strange nature of proxies obviously. I just wanted to know if this should be somehow fixed in here. Another issue is probably performance, as there is some minor overhead introduced. What I'd like to know is if https://github.com/doctrine/common/blob/master/lib/Doctrine/Common/Util/ClassUtils.php#L56 could be reduced to a `if ($object instanceof Proxy) { ... }`. |
| Comments |
| Comment by Benjamin Eberlei [ 31/Mar/12 ] |
|
A related Github Pull-Request [GH-315] was synchronize |
| Comment by Benjamin Eberlei [ 01/Apr/12 ] |
|
A related Github Pull-Request [GH-315] was synchronize |
| Comment by Benjamin Eberlei [ 01/Apr/12 ] |
|
A related Github Pull-Request [GH-315] was synchronize |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-315] was synchronize |
| Comment by Benjamin Eberlei [ 06/Apr/12 ] |
|
A related Github Pull-Request [GH-315] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-315] was synchronize |
[DDC-1737] MEDIUMTEXT field Created: 29/Mar/12 Updated: 23/May/12 Resolved: 23/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu/CentOS |
||
| Description |
|
I have a field which I want to be mysql mediumtext
Everything is fine, field created as 'mediumtext' I get |
| Comments |
| Comment by Guilherme Blanco [ 23/May/12 ] |
|
Issue seems to be fixed already in master. Coverage test: |
[DDC-1736] [GH-313] Fixed tests on Windows Created: 29/Mar/12 Updated: 30/Mar/12 Resolved: 30/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of hason: Url: https://github.com/doctrine/doctrine2/pull/313 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 29/Mar/12 ] |
|
A related Github Pull-Request [GH-313] was closed |
[DDC-1735] [GH-312] Removed LOCK_EX for writing Proxy class file Created: 29/Mar/12 Updated: 05/Jul/12 Resolved: 05/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.3, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of hason: Url: https://github.com/doctrine/doctrine2/pull/312 Message: LOCK_EX will not work on NFS and many other networked file systems. Replaces #307 |
| Comments |
| Comment by Benjamin Eberlei [ 29/Mar/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 30/Mar/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 30/Mar/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 01/Apr/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 04/Apr/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 06/Apr/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 07/Apr/12 ] |
|
A related Github Pull-Request [GH-312] was synchronize |
| Comment by Benjamin Eberlei [ 05/Jul/12 ] |
|
Changed to using temporary filename + rename |
[DDC-1726] [GH-310] [DDC-889] Mention parent class for debugging purposes. Created: 25/Mar/12 Updated: 30/Mar/12 Resolved: 30/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/310 Message: @beberlei I tried to use ClassMetadata#parentClasses but is not loaded at this point. |
| Comments |
| Comment by Benjamin Eberlei [ 26/Mar/12 ] |
|
A related Github Pull-Request [GH-310] was synchronize |
| Comment by Benjamin Eberlei [ 26/Mar/12 ] |
|
A related Github Pull-Request [GH-310] was synchronize |
| Comment by Benjamin Eberlei [ 26/Mar/12 ] |
|
A related Github Pull-Request [GH-310] was synchronize |
| Comment by Benjamin Eberlei [ 29/Mar/12 ] |
|
A related Github Pull-Request [GH-310] was synchronize |
| Comment by Benjamin Eberlei [ 29/Mar/12 ] |
|
A related Github Pull-Request [GH-310] was synchronize |
| Comment by Benjamin Eberlei [ 30/Mar/12 ] |
|
A related Github Pull-Request [GH-310] was closed |
[DDC-1725] [GH-309] Fix DDC-1686 Created: 25/Mar/12 Updated: 30/Mar/12 Resolved: 30/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of FabioBatSilva: Url: https://github.com/doctrine/doctrine2/pull/309 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 25/Mar/12 ] |
|
A related Github Pull-Request [GH-309] was synchronize |
| Comment by Benjamin Eberlei [ 26/Mar/12 ] |
|
A related Github Pull-Request [GH-309] was closed |
[DDC-1719] When tablename or field name contains an hyphen it generates an error Created: 21/Mar/12 Updated: 25/Jun/12 Resolved: 25/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Laurens Coudeville | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3 |
||
| Description |
|
In my database I have a table with '-' (hyphen) in the names of the tables and fields. But when mapping using annotations you get a mysql error because it generates a query that is not conform the mysql syntax. When using a hyphen in field or tablename (or others) you have to place it between quotes. The name of the table can be resolved using quotes in the table name, in code it means: @Table(name="directory-file") to @Table(name="`directory-file`"), you can't use this solution with the in the fields because the alias (AS in mysql syntax) also contains a '-' . Which results in a mysql error. Failing code: /**
/** @Id @Column(name="liddirectory-file",type="bigint") @GeneratedValue * */ |
| Comments |
| Comment by Fabio B. Silva [ 25/Jun/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/cb72219b118c158c9b5344c4b81ff2b1a9149ab0 |
[DDC-1718] types generated by Doctrine\ORM\Tools\EntityGenerator (in docblock) are sometimes wrong Created: 21/Mar/12 Updated: 29/Jul/12 Resolved: 29/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM, Tools |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Trivial |
| Reporter: | Brikou Carré | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
"@return smallint" instead of "@return integer"... same for date... etc... BTW it could be really great to have issues handled by github... (no need to create another account) |
| Comments |
| Comment by Fabio B. Silva [ 29/Jul/12 ] |
|
Fixed by : |
[DDC-1708] [GH-304] by jwage: Allow flushing of many entities by passing an array of entities. Created: 15/Mar/12 Updated: 23/May/12 Resolved: 23/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of jwage: Url: https://github.com/doctrine/doctrine2/pull/304 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 22/Mar/12 ] |
|
Implemented for 2.3 |
| Comment by Guilherme Blanco [ 23/May/12 ] |
|
According to GH, this issue is already fixed: https://github.com/doctrine/doctrine2/commit/3aba23ea35413189b8b2fd0f2221b9882e932653 |
[DDC-1697] DQL Query with key=>value array in parameter Created: 12/Mar/12 Updated: 25/Mar/12 Resolved: 25/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | 2.3 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | waldo | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP Version 5.3.3-1ubuntu9.10, Symfony 2.0.11 |
||
| Description |
|
In he method "processParameterValue" in the class Doctrine\ORM\Query line 303, a "for" loop is use for construct the parameter query. But if in the query parameter we pass a key=>value array, the method throw an error. A little example : $dql = $this->_em->createQueryBuilder(); return $dql->getQuery()->execute(); The method "processParameterValue" throw an error because he don't found the index 1. But if we replace the "for" loop by a foreach in Doctrine\ORM\Query::processParameterValue() : // TODO: What about Entities that have composite primary key? It work really fine. I remain at your disposal for any further information. Thanks for all! |
| Comments |
| Comment by Fabio B. Silva [ 25/Mar/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/8a52e3033b51f0f0b97e1ee75477644484debf2b |
[DDC-1696] String support in THEN and ELSE part of CASE expression is broken Created: 11/Mar/12 Updated: 12/Mar/12 Resolved: 12/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The SQL generated when using strings in the THEN and ELSE parts of the CASE expression are not valid. This testcase will fail: Noticed by a user at github: |
| Comments |
| Comment by Guilherme Blanco [ 12/Mar/12 ] |
|
Fixed by https://github.com/doctrine/doctrine2/commit/795438670517cd7a4e76bca6dd33fdc9bbb5d988 @beberlei please merge in 2.2! =D |
[DDC-1694] Entity Generator uses wrong DataTypes for docBlocks Created: 11/Mar/12 Updated: 05/May/12 Resolved: 05/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Rafael Dohms | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When using the Doctrine\ORM\Tools\EntityGenerator, largely used by Symfony, the wrong data types are used in the docblocks. For example: @param text $description Text needs to be converted to "string" in this case. So there needs to be proper Doctrine Data Type to php type as well as the conversion to DBAL that is already done. Examples: |
[DDC-1689] [GH-299] by patrick-mcdougle: Fixed comment for createQuery to include the variable name. Created: 06/Mar/12 Updated: 11/Mar/12 Resolved: 11/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of patrick-mcdougle: Url: https://github.com/doctrine/doctrine2/pull/299 Message: |
| Comments |
| Comment by Benjamin Eberlei [ 11/Mar/12 ] |
|
Merged |
[DDC-1687] [GH-298] by sandermarechal: Pagination using SQL walkers Created: 06/Mar/12 Updated: 12/Mar/12 Resolved: 12/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of sandermarechal: Url: https://github.com/doctrine/doctrine2/pull/298 Message: A CountSqlWalker and LimitSubquerySqlWalker have been implemented. By
SELECT g, u, COUNT(u.id) AS userCount
|
| Comments |
| Comment by Benjamin Eberlei [ 12/Mar/12 ] |
|
Merged for 2.3 |
[DDC-1686] Query/Expr/Join getAlias & getJoin Created: 06/Mar/12 Updated: 26/Mar/12 Resolved: 26/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Jelte Steijaert | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
It would be helpfull if we could get the alias and the join properties, much like we can get the alias and from properties from Query/Expr/From |
| Comments |
| Comment by Fabio B. Silva [ 26/Mar/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/2811d161bbb1b1e667cae5f0fb065018e82d6b25 |
[DDC-1685] Using the CountWalker on an entity with ID on OneToOne field fails Created: 06/Mar/12 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Bart van den Burg | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
any |
||
| Description |
|
When using the CountWalker on an entity which has @Id not on a column, but on a @OneToOne property, a fatal error occurs: Notice: Undefined index: person in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php line 2301 In this case I'm using the Paginator by KnpLabs. Here is the trace: Trace Notice: Undefined index: person in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php line 2301
500 Internal Server Error - ErrorException
Stack Trace
in D:\workspace9\roompot\vendor\symfony\src\Symfony\Component\HttpKernel\Debug\ErrorHandler.php at line 65
}
if (error_reporting() & $level && $this->level & $level) {
throw new \ErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line));
}
return false;
at ErrorHandler ->handle ('8', 'Undefined index: person', 'D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php', '2301', array('field' => 'person', 'platform' => object(MySqlPlatform)))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php at line 2301
at ClassMetadataInfo ->getQuotedColumnName ('person', object(MySqlPlatform))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 548
at SqlWalker ->walkPathExpression (object(PathExpression))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\AST\PathExpression.php at line 56
at PathExpression ->dispatch (object(SqlWalker))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 2126
at SqlWalker ->walkArithmeticPrimary (object(PathExpression))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 2105
at SqlWalker ->walkArithmeticFactor (object(PathExpression))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 2084
at SqlWalker ->walkArithmeticTerm (object(PathExpression))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 2061
at SqlWalker ->walkSimpleArithmeticExpression (object(PathExpression))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 1408
at SqlWalker ->walkAggregateExpression (object(AggregateExpression))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\AST\AggregateExpression.php at line 50
at AggregateExpression ->dispatch (object(SqlWalker))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 1139
at SqlWalker ->walkSelectExpression (object(SelectExpression))
at array_map (array(object(SqlWalker), 'walkSelectExpression'), array(object(SelectExpression)))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 596
at SqlWalker ->walkSelectClause (object(SelectClause))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 417
at SqlWalker ->walkSelectStatement (object(SelectStatement))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\Exec\SingleSelectExecutor.php at line 38
at SingleSelectExecutor ->__construct (object(SelectStatement), object(SqlWalker))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php at line 192
at SqlWalker ->getExecutor (object(SelectStatement))
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query\Parser.php at line 325
at Parser ->parse ()
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query.php at line 230
at Query ->_parse ()
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\Query.php at line 241
at Query ->_doExecute ()
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\AbstractQuery.php at line 643
at AbstractQuery ->execute (array(), '2')
in D:\workspace9\roompot\vendor\doctrine\lib\Doctrine\ORM\AbstractQuery.php at line 468
at AbstractQuery ->getResult ('2')
in D:\workspace9\roompot\vendor\knp-components\src\Knp\Component\Pager\Event\Subscriber\Paginate\Doctrine\ORM\QuerySubscriber.php at line 45
at QuerySubscriber ->items (object(ItemsEvent))
at call_user_func (array(object(QuerySubscriber), 'items'), object(ItemsEvent))
in D:\workspace9\roompot\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher.php at line 124
at TraceableEventDispatcher ->doDispatch (array(array(object(QueryBuilderSubscriber), 'items'), array(object(QueryBuilderSubscriber), 'items'), array(object(QuerySubscriber), 'items'), array(object(QuerySubscriber), 'items'), array(object(QuerySubscriber), 'items'), array(object(QuerySubscriber), 'items'), array(object(CollectionSubscriber), 'items'), array(object(PropelQuerySubscriber), 'items'), array(object(SolariumQuerySubscriber), 'items'), array(object(ArraySubscriber), 'items')), 'knp_pager.items', object(ItemsEvent))
in D:\workspace9\roompot\app\cache\sitwst05_roompot\classes.php at line 3996
at EventDispatcher ->dispatch ('knp_pager.items', object(ItemsEvent))
in D:\workspace9\roompot\app\cache\sitwst05_roompot\classes.php at line 5125
at ContainerAwareEventDispatcher ->dispatch ('knp_pager.items', object(ItemsEvent))
in D:\workspace9\roompot\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher.php at line 72
at TraceableEventDispatcher ->dispatch ('knp_pager.items', object(ItemsEvent))
in D:\workspace9\roompot\vendor\knp-components\src\Knp\Component\Pager\Paginator.php at line 76
at Paginator ->paginate (object(Query), '1', '25')
in D:\workspace9\roompot\src\Samson\TRSBundle\Controller\RegistrarController.php at line 34
at RegistrarController ->indexAction ()
at call_user_func_array (array(object(RegistrarController), 'indexAction'), array())
in D:\workspace9\roompot\app\cache\sitwst05_roompot\classes.php at line 4241
at HttpKernel ->handleRaw (object(Request), '1')
in D:\workspace9\roompot\app\cache\sitwst05_roompot\classes.php at line 4205
at HttpKernel ->handle (object(Request), '1', true)
in D:\workspace9\roompot\app\cache\sitwst05_roompot\classes.php at line 5192
at HttpKernel ->handle (object(Request), '1', true)
in D:\workspace9\roompot\app\bootstrap.php.cache at line 564
at Kernel ->handle (object(Request))
in D:\workspace9\roompot\web\app_dev.php at line 30
And the entity: Entity <?php
namespace Samson\TRSBundle\Entity;
use Samson\AddressBookBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class Registrar
{
/**
* @ORM\Id
* @ORM\OneToOne(targetEntity="Samson\AddressBookBundle\Entity\Person", cascade={"persist"})
* @ORM\JoinColumn(nullable=false)
*/
private $person;
public function getId()
{
return $this->person->getId();
}
public function getPerson()
{
return $this->person;
}
public function setPerson($person)
{
$this->person = $person;
}
}
|
| Comments |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
This is a bug with the KnpPager. It doent handle this siutation and breaks the DQL => SQL AST. Our own pager throws another exception here, solving that within the scope of that ticket now. |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
Fixed in master. |
[DDC-1679] [GH-296] by brikou: According to "Doctrine's implicit CS" and "Symfony's implicit CS" an emp... Created: 04/Mar/12 Updated: 05/Mar/12 Resolved: 05/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of brikou: Url: https://github.com/doctrine/doctrine2/pull/296 Message: ...ty line added to the end of the file (...same tweaks like the one pushed for the entity generator) |
| Comments |
| Comment by Guilherme Blanco [ 05/Mar/12 ] |
|
Merged. https://github.com/doctrine/doctrine2/commit/f1fe3607880b57dc51b5089e10ae8c949eeb77d2 |
[DDC-1677] [GH-295] by brikou: According to "Doctrine's implicit CS" and "Symfony's implicit CS" an emp... Created: 02/Mar/12 Updated: 03/Mar/12 Resolved: 03/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This issue is created automatically through a Github pull request on behalf of {username}: Url: https://github.com/doctrine/doctrine2/pull/295 Message: ...ty line added to the end of the file |
| Comments |
| Comment by Benjamin Eberlei [ 03/Mar/12 ] |
|
fixed |
[DDC-1673] ProxyFactory method generateProxyClasses argument $toDir does not affect anything Created: 29/Feb/12 Updated: 03/Mar/12 Resolved: 03/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.2.1, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Aigars Gedroics | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
See my note in the github changeset - https://github.com/doctrine/doctrine2/commit/a029b284234065a03dab4241b29f0325975eeac6#L1L116. Full method code on the master - https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Proxy/ProxyFactory.php#L116. |
| Comments |
| Comment by Guilherme Blanco [ 03/Mar/12 ] |
|
Fixed in https://github.com/doctrine/doctrine2/commit/bf80ee6a30f04aed406a3253ef7459b4fcf11bda |
| Comment by Benjamin Eberlei [ 03/Mar/12 ] |
|
Merged into 2.2 |
[DDC-1663] Implement @NamedNativeQuery and @SqlResultSetMapping Created: 21/Feb/12 Updated: 18/Apr/12 Resolved: 18/Apr/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Fabio B. Silva | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
You may also express queries in the native SQL dialect of your database.
|
| Comments |
| Comment by Guilherme Blanco [ 22/Feb/12 ] |
|
I'm fine with it. I didn't include it in the beginning (when I was creating the NamedQuery support) because of lack of time. A complete solution would be something like: /**
* @Entity
*
* @NamedNativeQueries({
* @NamedNativeQuery(
* name="sample-query",
* query="SELECT ... FROM ... WHERE ...",
* resultSetMapping="sample-mapping"
* )
* })
*
* @ResultSetMappings({
* @ResultSetMapping(
* name="sample-mapping",
* entities={
* @EntityResult(
* name="App\Entity\MyEntity",
* fields={
* @FieldResult(name="id", column="entity_id"),
* ...
* }
* ),
* ...
* }
* ),
* ...
* })
*/
class MyEntity
{
// ...
}
|
| Comment by Fabio B. Silva [ 18/Apr/12 ] |
|
Solved by : https://github.com/doctrine/doctrine2/commit/bad811df6a07992405d2f59968d39e1670cad154 |
[DDC-1657] The Doctrine cli tool does not handle schema correctly. Created: 19/Feb/12 Updated: 08/Jul/12 Resolved: 08/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Critical |
| Reporter: | Presteus | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux Mint Debian Edition, PHP 5.3.10, PostgreSQL 9.1 |
||
| Description |
|
At first time, sorry for my english and I will be short and brief, the problem is clearly explained in the title and the test is very simple. The entity /** * Short description. * * @Entity(repositoryClass="Stonewood\Model\Entity\Repository\Screen") * @Table(name="stonewood.screen") */ class Screen extends Entity { /** * Identifier * @var integer * * @Id * @GeneratedValue(strategy="IDENTITY") * @Column(name="pk", type="integer", nullable=false) */ private $pk; /** * Title * @var string * * @Column(name="title", type="string", length=255, nullable=false) */ private $title; /** * Path * @var string * * @Column(name="path", type="string", length=255, nullable=false) */ private $path; /** * Register date * @var Date * * @Column(name="ddate", type="date", nullable=false) */ private $ddate; /** * Avatar * @var Stonewood\Model\Entity\Avatar * * @ManyToOne(targetEntity="Stonewood\Model\Entity\Avatar") * @JoinColumn(name="pk_avatar", referencedColumnName="pk", nullable=true, onDelete="CASCADE") */ private $avatar; /** * */ public function __construct($pk = null, $title = null, $path = null, $ddate = null, $avatar = null) { $this->setPk($pk); $this->setTitle($title); $this->setPath($path); $this->setDdate($ddate); $this->setAvatar($avatar); } [...] } Before the first deployment ./doctrine orm:schema-tool:update --dump-sql CREATE TABLE stonewood.screen (pk SERIAL NOT NULL, pk_avatar INT DEFAULT NULL, title VARCHAR(255) NOT NULL, path VARCHAR(255) NOT NULL, ddate DATE NOT NULL, PRIMARY KEY(pk)); CREATE INDEX IDX_D91A7FB3E9032144 ON stonewood.screen (pk_avatar); During the first deployement
./doctrine orm:schema-tool:update --force
Updating database schema...
Database schema updated successfully! "100" queries were executed
I test the application and all work correctly After this test ./doctrine orm:schema-tool:update --dump-sql ALTER TABLE screen ADD pk SERIAL NOT NULL; ALTER TABLE screen ADD pk_avatar INT DEFAULT NULL; ALTER TABLE screen ADD title VARCHAR(255) NOT NULL; ALTER TABLE screen ADD path VARCHAR(255) NOT NULL; ALTER TABLE screen ADD ddate DATE NOT NULL; ALTER TABLE screen ADD CONSTRAINT FK_D91A7FB3E9032144 FOREIGN KEY (pk_avatar) REFERENCES stonewood.avatar (pk) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE; CREATE INDEX IDX_D91A7FB3E9032144 ON screen (pk_avatar); ALTER TABLE screen ADD PRIMARY KEY (pk); The result is false. I should see Nothing to update - your database is already in sync with the current entity metadata. |
| Comments |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
This issue was partially fixed in DBAL already, however it seems there is still a problem with sequence detection. |
| Comment by Benjamin Eberlei [ 08/Jul/12 ] |
|
Fixed the sequence problem in 2.3, the other schema problems where indeed fixed in 2.2.1 already. |
[DDC-1637] Linq-like Filter API for collections Created: 06/Feb/12 Updated: 09/Jul/12 Resolved: 09/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 6 |
| Labels: | None | ||
| Description |
|
We want an API that allows users to filter collections to subsets on the SQL level during the runtime (not using DQL). Example: class Post
{
private $comments;
public function getRecentComments()
{
return $this->comments->select(Expression::lessThan("commentDate", new \DateTime("-7 days")));
}
}
The language of this Expressions for selecting entities out of a collection has to be so simple that it works on both arrays and any persistence backed data-source. The Collection#select() method would return a new collection that is not equal the invoked collection. |
| Comments |
| Comment by Benjamin Eberlei [ 08/Feb/12 ] |
|
First API example: https://gist.github.com/1766769 |
| Comment by Benjamin Eberlei [ 16/Mar/12 ] |
|
There is a PR now https://github.com/doctrine/common/pull/117 |
| Comment by Benjamin Eberlei [ 09/Jul/12 ] |
|
Implemented |
[DDC-1616] SchemaTool - CreateCommand should dump "valid" SQL and omit ATTENTION line Created: 24/Jan/12 Updated: 22/Feb/12 Resolved: 22/Feb/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Raphael Stolt | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
When running "doctrine orm:schema-tool:create --dump-sql" it should not omit the semicolon of the last SQL statement (though the current SQL output is also valid and executable) and it should omit the ATTENTION line (or output it as an SQL commented line) as the schema isn't applied/created anyways. This would make it much easier to write for e.g. the SQL schema to a file for further processing; but might also break systems (e.g. buildsystems) which have a workaround for the above mentioned shortcoming. |
| Comments |
| Comment by Guilherme Blanco [ 22/Feb/12 ] |
|
Fixed by https://github.com/doctrine/doctrine2/commit/48dcee9d60459fce1542d11536d465f5d89cff55 |
[DDC-1608] Lazy load more restrict when consuming PersistentCollection trigger actions to *Persisters Created: 17/Jan/12 Updated: 18/Jan/12 Resolved: 18/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Guilherme Blanco | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Since https://github.com/doctrine/doctrine2/pull/259 we identified an issue with the Persisters that are failing to check for entities that exist in UoW (managed and sched for insert) and are now being checked is they are part of Collection. |
| Comments |
| Comment by Guilherme Blanco [ 18/Jan/12 ] |
|
Fixed in https://github.com/doctrine/doctrine2/commit/d39760ba49418f42f235e9befe223896f11de4bd |
| Comment by Benjamin Eberlei [ 18/Jan/12 ] |
|
Merged back to 2.2 |
[DDC-1606] Added fix for collection->contains with many-to-many extra lazy fetchMode Created: 17/Jan/12 Updated: 22/Jan/12 Resolved: 17/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.2.0-RC1, 2.2, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Guilherme Blanco | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
That case previously triggered a PHP error along the lines of: Notice: Undefined index: 0000000062a3a7690000000033c91b26 in doctrine/lib/Doctrine/ORM/UnitOfWork.php line 2202 #0 doctrine/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php(267): Doctrine\ORM\UnitOfWork->getEntityIdentifier(Object(Item)) #1 doctrine/lib/Doctrine/ORM/PersistentCollection.php(411): Doctrine\ORM\Persisters\ManyToManyPersister->contains(Object(Doctrine\ORM\PersistentCollection), Object(Item)) #2 Test.php(71): Doctrine\ORM\PersistentCollection->contains(Object(Item)) Associated PR: https://github.com/doctrine/doctrine2/pull/259 |
| Comments |
| Comment by Guilherme Blanco [ 17/Jan/12 ] |
|
Merged in https://github.com/doctrine/doctrine2/commit/c1012f79706491e9dbf6c8741225b62833c6d2ce |
[DDC-1603] Unique key name isn't correctly set Created: 16/Jan/12 Updated: 22/Jan/12 Resolved: 17/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.2-BETA2 |
| Fix Version/s: | 2.1.6, 2.2.0-RC1, 2.2, 2.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Thomas Tourlourat - Armetiz | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Example : <unique-constraints> This will create : instead of : The problem comme from SchemaTool, and the first key is a valid result because of "==" instead of "===" inside Table.php. I have create a PR on Github. |
| Comments |
| Comment by Thomas Tourlourat - Armetiz [ 16/Jan/12 ] |
|
Here the PR for the ORM SchemaTool : https://github.com/doctrine/doctrine2/pull/261 |
| Comment by Guilherme Blanco [ 17/Jan/12 ] |
|
Merged https://github.com/doctrine/doctrine2/commit/2bb511584e5d37ddad6c669a19d8e6b4a20f7b2b |
| Comment by Benjamin Eberlei [ 21/Jan/12 ] |
|
DBAL merged back into 2.2 and 2.1.x |
| Comment by Benjamin Eberlei [ 21/Jan/12 ] |
|
and Merged into 2.2 and 2.1.x ORM |
[DDC-1598] ProxyFactory makes assumptions on identifier getter code Created: 13/Jan/12 Updated: 16/Jan/12 Resolved: 16/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.2-BETA1, 2.2-BETA2, Git Master |
| Fix Version/s: | 2.2, 2.3, 2.x |
| Security Level: | All |
| Type: | Bug | Priority: | Critical |
| Reporter: | Marco Pivetta | Assignee: | Benjamin Eberlei |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | None | ||
| Description |
|
As of In my opinion the check should be matching following: (public|protected)\s+function\s+getFieldname\s*(\s*)\s+ {\s*\$this\s*->Fieldname\s*;\s*}Not really experienced with regex, but currently cannot come up with a more secure check. |
| Comments |
| Comment by Benjamin Eberlei [ 15/Jan/12 ] |
|
Can you explain why you think this is necessary? You are right an id method with logic could exist in 4 lines of code, but for what purpose? |
| Comment by Marco Pivetta [ 15/Jan/12 ] |
|
First of all it is a question of concept. Doctrine shouldn't assume anything about entities outside of their fields. It already introduces a level of complication when we explain how to clone/serialize objects, which was very confusing. Asking for the purpose of an identifier field getter method is in my opinion again an attempt of making assumptions over user's code... What if the user wrote something like: public function getIdentifierField1() private function _myInitializationStuff() For instance, opening file handlers, sockets, whatever... This is a case that would break the entity because of optimization introduced by the ProxyFactory. (not to mention when getIdentifierField1 does some conversion, like return $this->identifierField1 + self::OFFSET_REQUIRED_BY_WEBSERVICE; I'm not arguing about the validity of this optimization, but that the checks are too lazy. I've read something about moving the ProxyFactory to common and using code scanner tools, and the check should be about applying the optimization only when the form is return $this->identifierField1; That's why I put the example of the regex. That would probably not be as safe as using some reflection-based tool, but surely more than just checking if the code is <= 4 lines... |
| Comment by Marco Pivetta [ 15/Jan/12 ] |
|
Also don't know what stuff like EAccelerator (known in this Jira as of it's fantastic idea about stripping comments) would make the check of the 4 lines like. |
| Comment by Benjamin Eberlei [ 16/Jan/12 ] |
|
This argument is void i just seen A method: public function getIdentifierField1() { return $this->identifierField1? $this->_myInitializationStuff() : null; } Will only used when the id is not set anyways. In any other case Ids are Immutable and changing them in your code would break a lot more than just this smart proxy method generation. |
| Comment by Marco Pivetta [ 16/Jan/12 ] |
|
Nope, this code actually works only if the ID is set |
| Comment by Marco Pivetta [ 16/Jan/12 ] |
|
As of IRC there's 3 ways (for now) to get this solved:
|
[DDC-1596] Discriminator column has no table alias Created: 11/Jan/12 Updated: 13/Jan/12 Resolved: 13/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Gandzy Ghennady | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Some single table inheritance Resource.php /** * @Orm\Entity * @Orm\Table(name="resource") * @Orm\InheritanceType("SINGLE_TABLE") * @Orm\DiscriminatorColumn(name="type", type="string") * @Orm\DiscriminatorMap({"Container" = "Container", "News"="News"}) */ abstract class Resource { } $em->getRepository('News')->find($id)
/**
* generate SQL like this:
* SELECT t0.id AS id1, t0.name AS name2, type FROM resource t0 WHERE t0.id = ? AND t0.type IN ('News')
*/
Column type has no table alias. SELECT t0.id AS id1, t0.name AS name2, t0.type FROM resource t0 WHERE t0.id = ? AND t0.type IN ('News')
Proposed patch attached |
| Comments |
| Comment by Guilherme Blanco [ 13/Jan/12 ] |
|
Fixed in https://github.com/doctrine/doctrine2/commit/bb1021198355871bd78b19c7795900be0020520b |
[DDC-1591] Paginator: ResultVariable cannot be used in HavingClause Created: 09/Jan/12 Updated: 15/Mar/12 Resolved: 15/Mar/12 |
|
| Status: | Closed |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Christian Raue | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Using the QueryBuilder, I'm getting the message Notice: Undefined index: distance in vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php line 2128 when trying to add a "having" clause for the field "distance", which is defined in the "select" part of the statement: $queryBuilder
->select('myEntity, MY_FUNCTION() AS distance')
->having('distance <= 10')
;
|
| Comments |
| Comment by Fabio B. Silva [ 14/Jan/12 ] |
|
Christian, I couldn't reproduce. Can you give more details ? Thanks. |
| Comment by Christian Raue [ 15/Jan/12 ] |
|
I tried it again and found out that it could also be an issue in https://github.com/whiteoctober/Pagerfanta rather in Doctrine itself because my query is passed to that pager to show a sliced result. Maybe that issue could already be resolved by https://github.com/whiteoctober/Pagerfanta/pull/46. Will give it a try... |
| Comment by Christian Raue [ 15/Jan/12 ] |
|
In fact, applying that patch made the query work. So this is not a Doctrine issue. |
| Comment by Christian Raue [ 10/Feb/12 ] |
|
Since the PR mentioned was not merged and Doctrine's pagination is used now, the issue still exists and I cannot use a result variable in a "having" clause. But I'd like to. |
| Comment by Christophe Coevoet [ 10/Feb/12 ] |
|
This ticket is indeed invalid as it is talking about the query builder. Please open a dedicated ticket for the pagination issue |
| Comment by Christian Raue [ 10/Feb/12 ] |
|
But I am using the QueryBuilder and then passing the query to a DoctrineORMAdapter instance. The error message didn't change, just the line number: Notice: Undefined index: distance in vendor\doctrine\lib\Doctrine\ORM\Query\SqlWalker.php line 2142 But I can confirm that this error doesn't occur when not using a paginator. How to continue? |
| Comment by Benjamin Eberlei [ 10/Feb/12 ] |
|
Which paginator are you using? |
| Comment by Christian Raue [ 10/Feb/12 ] |
| Comment by Benjamin Eberlei [ 20/Feb/12 ] |
|
Renamed and assigned issue. |
| Comment by Alexander [ 15/Mar/12 ] |
|
Fixed as sander was kind enough to resubmit the code to the doctrine2 repository now instead: |
[DDC-1579] MappedSuperClass and inheritance problem with console generate:entities command Created: 05/Jan/12 Updated: 10/Dec/12 Resolved: 09/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.1.5 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sergio Moya | Assignee: | Benjamin Eberlei |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian 6.0.3 - Linux 2.6.32-5-amd64 Symfony2 2.0.8 + Doctrine2 2.1.5 |
||
| Issue Links: |
|
||||||||
| Description |
|
I have two classes. One extends from another. I'm using the annotation @MappedSuperclass This is a bug of the command console? Really you should not copy them if you do not extend them. When you What happens? Im usign Symfony 2. Thanks!!!! Code: Father class: /******************************************************************** /**
/**
/**
/**
|
| Comments |
| Comment by Benjamin Eberlei [ 09/Jan/12 ] |
|
It is a known problem that will be fixed in 2.3 hopefully. |
| Comment by Johan Hendrik Ehlers [ 03/Jul/12 ] |
|
I just noticed that this is only an issue if the member has a protected scope in the mapped super class, it works fine for private members. |
| Comment by Lukas Domnick [ 10/Dec/12 ] |
|
As of Doctrine 2.3.0, Symfony 2.1.3, this behaviour is still reproducable. |
[DDC-1572] LIKE expressions doesn't allow the matching pattern to be a string function Created: 29/Dec/11 Updated: 31/Dec/11 Resolved: 31/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Miloslav "adrive" Kmet | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Like expressions doesn't allow the matching apttern to be a function returning string like LOWER(column) LIKE LOWER(:param) Query parsers is returning exception like this:
It is not possible to construct queries like this:
I'll create a pull request on github for this issue. |
| Comments |
| Comment by Benjamin Eberlei [ 29/Dec/11 ] |
|
Assigned to Guilherme |
| Comment by Benjamin Eberlei [ 29/Dec/11 ] |
|
This issue is referenced in Github Pull-Request GH-245 |
| Comment by Benjamin Eberlei [ 31/Dec/11 ] |
|
This was merged |
[DDC-1567] GH-242: [UnderscoreNamingStrategy] fix docblock Created: 27/Dec/11 Updated: 28/Dec/11 Resolved: 28/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/242 |
| Comments |
| Comment by Benjamin Eberlei [ 28/Dec/11 ] |
|
Resolved |
[DDC-1562] GH-240: fix QueryDqlFunctionTest#testFunctionSubstring order Created: 23/Dec/11 Updated: 28/Dec/11 Resolved: 28/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/240 Hello, I got the same problem of #234 http://travis-ci.org/#!/FabioBatSilva/doctrine2/jobs/441187 |
[DDC-1561] GH-239: Fix $qb->expr() PHPDoc @return type. Created: 23/Dec/11 Updated: 03/Jan/12 Resolved: 28/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.6, 2.2-BETA2, 2.2, 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/239 The autocompletion was missing so i was sad. But hey, it's open source! |
| Comments |
| Comment by Benjamin Eberlei [ 28/Dec/11 ] |
|
Fixed |
[DDC-1557] SimpleSelectExpression does not accept DQL functions Created: 22/Dec/11 Updated: 29/Dec/11 Resolved: 29/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | 2.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Elnur Abdurrakhimov | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
SELECT m
FROM MealBundle:Meal m
WHERE m.user = :user OR m.user IN (
SELECT IDENTITY(s.to)
FROM SubscriptionBundle:Subscription s
WHERE s.from = :user
)
[Syntax Error] line 0, col 82: Error: Expected Doctrine\ORM\Query\Lexer::T_FROM, got '(' |
| Comments |
| Comment by Benjamin Eberlei [ 29/Dec/11 ] |
|
This issue is referenced in Github Pull-Request GH-246 |
| Comment by Benjamin Eberlei [ 29/Dec/11 ] |
|
Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/246 |
| Comment by Guilherme Blanco [ 29/Dec/11 ] |
|
Fixed in https://github.com/doctrine/doctrine2/commit/e43897916a001b6fe9cd8df27d6c9c272f41c854 |
[DDC-1550] GH-234: Fix QueryTest#testJoinQueries order Created: 20/Dec/11 Updated: 28/Dec/11 Resolved: 28/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/234 I don't know why, but sometimes postgres change the order by column default. http://travis-ci.org/#!/doctrine/doctrine2/jobs/428335 I just add ORDER BY, I think that fix the problem. |
[DDC-1542] GH-221: [Inheritance] Joined: Default discriminator map Created: 16/Dec/11 Updated: 04/May/12 Resolved: 04/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/221 Hi all, I know this topic was discussed a lot of times, but I wanted to give it a try anyway. I want the discriminator map to be configured dynamically by doctrine instead of having to manually configure it myself. So I've digged into the code and the only place I've found (yet) to put the necessary code to make this happen is in the Drivers, just when they're loading the mapping information. So far, I've put a very simple piece of code in the AnnotationDriver to give it a try and I wrote a test for it. But before going on I wanted to ask you if it looks ok for you. I've tested it in an application I'm working on and, so far, it works. Two things come to mind though: 1) Is there any special case this would cause problems that I don't know of? Thanks! |
| Comments |
| Comment by Benjamin Eberlei [ 28/Dec/11 ] |
|
Mark as improvement and schedule for 2.3 |
| Comment by Benjamin Eberlei [ 22/Mar/12 ] |
|
A related Github Pull-Request [GH-221] was |
[DDC-1529] Multiple FROM Entities and inheritance Created: 12/Dec/11 Updated: 19/Jan/12 Resolved: 19/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL, ORM |
| Affects Version/s: | 2.1.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Johan Dufour | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Symfony 2 |
||
| Description |
|
I got a single table inheritance on an object Content (Program, Article, etc...) when try a simple :
The generated sql is :
The only problem is, we got an extra AND at the end of the query, the query should look smthin like this :
|
| Comments |
| Comment by Guilherme Blanco [ 19/Jan/12 ] |
|
Invalid for 2.2. I couldn't track the exact commit this was fixed, so I'll keep fix version for 2.3. |
[DDC-1497] Orm:generate-entities generates incorrect code when it has multiple relations with the same entity Created: 17/Nov/11 Updated: 27/May/12 Resolved: 27/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Tools |
| Affects Version/s: | 2.1.2 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Kéri Norbert | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Environment: |
ArchLinux, PHP 5.3.8 |
||
| Description |
|
Using the same entities, as in the cookbook, when you generate the entities, the add* methods on User, or generally, on the inverse for many type relations are incorrect, and overwrite each other, so you end up with only one add method, that is incorrectly named. Rework\Model\User:
type: entity
table: user
id:
id:
type: integer
generator:
strategy: AUTO
fields:
name:
type: string
oneToMany:
reportedBugs:
targetEntity: Bug
mappedBy: reporter
assignedBugs:
targetEntity: Bug
mappedBy: engineer
Rework\Model\Bug:
type: entity
table: bug
id:
id:
type: integer
generator:
strategy: AUTO
fields:
name:
type: string
manyToOne:
reporter:
targetEntity: User
inversedBy: reportedBugs
engineer:
targetEntity: User
inversedBy: assignedBugs
The generated method on User.php /**
* Add reportedBugs
*
* @param Rework\Model\Bug $reportedBugs
*/
public function addBug(\Rework\Model\Bug $reportedBugs)
{
$this->reportedBugs[] = $reportedBugs;
}
What I expected: |
| Comments |
| Comment by venimus [ 17/Jan/12 ] |
|
I also reproduce that with a manyToMany relations The misbehavior I found to be in the EntityGenerator.php on lines 706-712
if ($type == "add") {
$addMethod = explode("\\", $typeHint);
$addMethod = end($addMethod);
$methodName = $type . $addMethod;
} else {
$methodName = $type . Inflector::classify($fieldName);
}
the whole block should be simply $methodName = $type . Inflector::classify($fieldName); |
| Comment by Schyzophrenic [ 31/Mar/12 ] |
|
I have also reproduced the very same issue on Doctrine 2.1.4 on a Win7 environment (using Symfony2, but it is not really relevant here). |
| Comment by Benjamin Eberlei [ 27/May/12 ] |
|
Fixed but merged only into master, since this is also a BC break. |
[DDC-1473] GH-181: make merge copy non persisted properties too Created: 06/Nov/11 Updated: 06/Aug/12 Resolved: 04/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Pull-Request was automatically synchronized The behavior of merging should be to return a managed object with exactly the same values than the detached one. The problem was that it only copies persistable properties. |
| Comments |
| Comment by Benjamin Eberlei [ 06/Aug/12 ] |
|
A related Github Pull-Request [GH-181] was opened |
| Comment by Benjamin Eberlei [ 06/Aug/12 ] |
|
A related Github Pull-Request [GH-181] was closed |
[DDC-1470] Bad discrimator value give imprecise error exception Created: 04/Nov/11 Updated: 16/Mar/12 Resolved: 16/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.3 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Francois Mazerolle | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When you define a wrong discriminator field in the mapping configuration, doctrine will return the following ErrorException when trying to get an instance of the object: ErrorException: Notice: Undefined index: in /Users/fmaz/Site/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php line 92 This is not precise enough, an error giving hint on the mapping configuration that is concerned, and on the bad field should be given. Hope this will help improving the "userfriendlyness" |
| Comments |
| Comment by Guilherme Blanco [ 16/Mar/12 ] |
|
Fixed in https://github.com/doctrine/doctrine2/commit/6f3ef148a95c6e598f9b16848c6a33b3d7a39077 |
[DDC-1426] Github-PR-115 by mpdeimos: findByXXX does not accept orderBy/limit/offset Created: 17/Oct/11 Updated: 11/Mar/12 Resolved: 11/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Guilherme Blanco | Assignee: | Alexander |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Our modification to pass findByXXX functions orderBy/limit/offset params for entity repositories like one is used from normal findBy function. We're using an if cascade in favor of the call_user_function_array since the latter is considered as slow. PS: If i need to target this pull request to your master, I'll resubmit - it's just that we're building against a stable codebase. Reference link: https://github.com/doctrine/doctrine2/pull/115 |
| Comments |
| Comment by Alexander [ 11/Mar/12 ] |
|
Added in master. See here: https://github.com/doctrine/doctrine2/pull/115. |
[DDC-1412] DriverChain defaultDriver Created: 11/Oct/11 Updated: 29/Jan/12 Resolved: 28/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Thomas Tourlourat - Armetiz | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
The \Doctrine\ORM\Mapping\Driver\DriverChain is a good thing, but a default driver should be a another great thing. Actually, to use DoctrineExtension Translatable I have to use the DriveChain to add a specific driver for Gedmo\Translatable. $driverChain->addDriver ($entityDriver, 'EntityA'); It would be really friendly to do I have attach a fix (SVN) for the DriveChain class. |
| Comments |
| Comment by Fabio B. Silva [ 29/Jan/12 ] |
|
Fixed in : https://github.com/doctrine/doctrine2/commit/16b22f0f3138ad607ccecd9397d0ec267d6cc478 |
[DDC-1379] Entity Generator Bug with extended classes Created: 16/Sep/11 Updated: 09/Jan/12 Resolved: 09/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Mark Badolato | Assignee: | Benjamin Eberlei |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I'm presently using Doctrine 2 in conjunction with Symfony 2 and have come across a bug with the Entity Generator when I'm extending an abstract class. Here's a minor example to demonstrate (please note, any annotations problems or typos are a result of my typing in this ticket. This isn't an actual example, but does accurately show how to reproduce the issue) Foo.php abstract class Foo { /** * @Column(name="first_name") */ protected $firstName; /** * @Column(name="last_name") */ protected $lastName; /** * @ORM\Column(name="is_active", type="boolean") */ protected $isActive; } Bar.php /** * @Entity */ class Bar extends Foo { /** * @Id * @Column(type="integer") * @GeneratedValue(strategy="AUTO") */ protected $id; /** * @Column(name="created_at", type="datetime") */ protected $createdAt; } Using a setup similar to the above, where Bar extends Foo, there is an issue with the Generator. 1) The generator is redeclaring Foo's properties, as private variables, in Bar So, opening Bar after running the generator, shows the getters and setters, but shows: This causes issues because the properties are being recreated as local versions, and their scope is set to private, conflicted with the more open protected version in the abstract class. To me, they shouldn't be placed in Bar because they're declared as protected in Foo and thus Bar has access to them. Also, when they are placed in Bar, the file formatting is messed up around them, suggesting that they were mis-placed in the file. 2) This may or may not be a bug (it may be intended behavior), but... I would think that when running the generator, the getters and setters for the protected properties declared in Foo would be placed in Foo, and not placed in the class(es) that extend Foo (in this case, Bar). If I also have a class Baz that extends Foo, then Bar and Baz will now have copies of the same getFirstName(), getLastName(), and getIsActive() methods, which is unneeded. They can be placed in the parent class, and overridden in the subclasses if more/different functionality/behavior is needed by the subclass. Hopefully this is a clear example. Please feel free to hit me up for more info! |
| Comments |
| Comment by Christoph Schaefer [ 30/Oct/11 ] |
|
I can confirm this behavior. Before generation: Foo /** * @ORM\Entity * @ORM\HasLifecycleCallbacks * * @ORM\InheritanceType("JOINED") * @ORM\DiscriminatorColumn(name="discr", type="string") * @ORM\DiscriminatorMap({"foo_bar" = "FooBar"}) */ class Foo { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * creation date * * @ORM\Column(name="created_at",type="datetime") */ protected $createdAt; /** * getCreatedAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set the creation date * * @return null */ public function setCreatedAt(\DateTime $createdAt) { $this->createdAt = $createdAt; } /** * @ORM\PrePersist */ public function prePersist() { $this->createdAt = new \DateTime(); } } FooBar /** * @ORM\Entity */ class FooBar extends Foo { /** * * @ORM\Column(type="string", length=255) */ protected $title; } after generation of FooBar: FooBar /** * @ORM\Entity */ class FooBar extends Foo { /** * * @ORM\Column(type="string", length=255) */ protected $title; /** * @var integer $id */ private $id; /** * @var datetime $createdAt */ private $createdAt; /** * Set title * * @param string $title */ public function setTitle($title) { $this->title = $title; } /** * Get title * * @return string */ public function getTitle() { return $this->title; } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set createdAt * * @param datetime $createdAt */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; } /** * Get createdAt * * @return datetime */ public function getCreatedAt() { return $this->createdAt; } } It looks like the generator doesn't check if an attribute is inherited and therefore is already defined. This bug is really annoying, especially when working with bigger objects. Tested within Symfony2 v2.0.4 doctrine-common]
git=http://github.com/doctrine/common.git
version=2.1.2
[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
version=2.1.3
[doctrine]
git=http://github.com/doctrine/doctrine2.git
version=2.1.2
-Chris |
| Comment by Benjamin Eberlei [ 09/Jan/12 ] |
|
As per the help message of the entity generation inheritance generation is not yet supported and will not work. Its planned for 2.3. Follow DDC-1590 for current information. |
[DDC-1185] Make default column naming strategy configurable Created: 30/May/11 Updated: 29/Dec/11 Resolved: 29/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Johannes Schmitt | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Right now, the property name is simply taken as column name. It would be nice if this default naming strategy were made configurable, so that you could plugin for example a camel-cased underscored naming strategy. |
| Comments |
| Comment by Fabio B. Silva [ 29/Dec/11 ] |
|
FIxed in https://github.com/doctrine/doctrine2/commit/abb258c951dd416fc5325ef548d15c7acd35703e |
[DDC-1065] Exception message unclear when persisting a null object Created: 09/Mar/11 Updated: 22/Dec/11 Resolved: 22/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Francois Zaninotto | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS, symfony2 SE |
||
| Description |
|
When persisting a null object in the entity manager, the exception message says "NULL", which is not very helpful. The problem lies at the beginning of Doctrine/ORM/EntityManager::persist(), where the exception should be replaced by: if ( ! is_object($entity)) { |
| Comments |
| Comment by Benjamin Eberlei [ 22/Dec/11 ] |
|
This issue is referenced in Github Pull-Request GH-236 |
| Comment by Benjamin Eberlei [ 22/Dec/11 ] |
|
Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/236 |
| Comment by Guilherme Blanco [ 22/Dec/11 ] |
|
Fixed by merge: https://github.com/doctrine/doctrine2/commit/ec58285b3f05de1c1b7a127fedb12021dccf0762 |
[DDC-964] Implement @AssociationOverride and @FieldOverride for MappedSuperclasses Created: 31/Dec/10 Updated: 02/May/12 Resolved: 02/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Description |
|
We should allow to override certain attributes of associations and fields that are defined in a mapped superclass: 1. Fields should allow the Column Name to be different. |
| Comments |
| Comment by Benjamin Eberlei [ 14/Dec/11 ] |
|
This issue is referenced in Github Pull-Request GH-218 |
| Comment by Fabio B. Silva [ 02/May/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/0a09a28ec9301b371da54babb076df84a0d2033f |
[DDC-954] Look into deferring foreign key checks until flush finished Created: 28/Dec/10 Updated: 23/May/12 Resolved: 23/May/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
|||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||
| Description |
|
There are several timing issues that will be complicated to fix which relate to foreign key checks. If we could optionally allow people to defer the foreign key checks until flush has fully completed we could simply solve them all, maybe even across all vendors? |
| Comments |
| Comment by Benjamin Eberlei [ 29/Dec/10 ] |
|
Postgresql: http://stackoverflow.com/questions/139884/how-do-i-disable-referential-integrity-in-postgres-8-2 |
| Comment by Guilherme Blanco [ 23/May/12 ] |
|
As per https://github.com/doctrine/doctrine2/commit/3e601c3a53226ce981fe82db164f297a8d605ae7 all tests related to this issue are closed. |
[DDC-937] doctrine-mapping.xsd sequence relation-entities Created: 15/Dec/10 Updated: 23/Jun/12 Resolved: 23/Jun/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Minor |
| Reporter: | Leon van der Ree | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I noticed some problems with The order in which you define the elements like cascade and join- |
| Comments |
| Comment by Guilherme Blanco [ 04/Oct/11 ] |
|
Is this issue still valid in the latest Doctrine (trunk)? It doesn't seem to be. |
| Comment by Guilherme Blanco [ 23/Jun/12 ] |
|
No reply from user and issue seems to be fixed already in master |
Look into deferring foreign key checks until flush finished
(DDC-954)
|
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | Git Master |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Sub-task | Priority: | Major |
| Reporter: | André Ribeiro de Miranda | Assignee: | Guilherme Blanco |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
By using the association mapping 'One-To-Many, Self-referencing' removes the cascade. How to follow the example below, and removed the first parent entity after the children entities. And if you use foreign key onDelete=restrict the referential integrity error A possible solution in the patch attached below Category.php <?php /** @Table(name="category") */ class Category { /** * @Id * @Column(name="id") */ public $id; /** * @OneToMany(targetEntity="Category", mappedBy="parent", cascade={"remove"}) */ public $children; /** * @ManyToOne(targetEntity="Category", inversedBy="children") * @JoinColumn(name="parent_id", referencedColumnName="id") */ public $parent; public function __construct() { $this->children = new \Doctrine\Common\Collections\ArrayCollection(); } } ?> CREATE TABLE `category` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(10) unsigned DEFAULT NULL, `name` varchar(50) NOT NULL, PRIMARY KEY (`id`), KEY `fk_id_parent_id` (`parent_id`), CONSTRAINT `fk_id_parent_id` FOREIGN KEY (`parent_id`) REFERENCES `category` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC |
| Comments |
| Comment by Guilherme Blanco [ 23/May/12 ] |
|
Seems to be fixed already in master. |
[DDC-889] Not a mapped superclass or id not found exceptions should mention parent classes Created: 23/Dec/10 Updated: 30/Mar/12 Resolved: 30/Mar/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Benjamin Eberlei | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When either the "not an entity or mapped superclass" or the "no id/primary key found" exceptions are thrown the Mapped Parent classes of $cm->parentClasses should be mentioned for debugging purposes. |
| Comments |
| Comment by Benjamin Eberlei [ 30/Mar/12 ] |
|
Merged |
[DDC-852] An easy way of generally setting the default id name/foreign key name suffix doctrine uses Created: 31/Oct/10 Updated: 05/Jul/12 Resolved: 24/Dec/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | Mapping Drivers |
| Affects Version/s: | 2.0-BETA4 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Daniel Alvarez Arribas | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Doctrine 2 is currently using "id" as the default name for identifier columns, and "_id" as suffix for corresponding foreign key columns. I think this is quite reasonable in most cases. Now, assuming that for any reason I wanted to change this to something else for all relationships, currently there does not seem to be any easy way to do it. /**
The reason why I am doing this is that I am doing a 1:1 data import based on a data model that is already defined, and it just happens to contain properties named "id", It would be great to have a less redundant way of configuring Doctrine to use a different name/suffix generally, e.g. by calling a setter method on the configuration object, like |
| Comments |
| Comment by Marc Hodgins [ 01/Nov/10 ] |
|
Related to |
| Comment by Benjamin Eberlei [ 24/Dec/11 ] |
|
Related Pull Request was closed: https://github.com/doctrine/doctrine2/pull/241 |
| Comment by Guilherme Blanco [ 24/Dec/11 ] |
|
FIxed in https://github.com/doctrine/doctrine2/commit/abb258c951dd416fc5325ef548d15c7acd35703e |
| Comment by Benjamin Eberlei [ 05/Jul/12 ] |
|
A related Github Pull-Request [GH-391] was opened |
[DDC-807] Adding columnDefinition for @DiscriminatorColumn Created: 15/Sep/10 Updated: 14/Feb/12 Resolved: 14/Feb/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | None |
| Affects Version/s: | 2.0-BETA4 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Lars Strojny | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Current @DiscriminatorColumn does not allow to use a specific column definition. However, in the MySQL world it is quite common to use the ENUM or TINYINT datatype for efficient discriminator columns. It would be great if something like this would be possible: @DiscriminatorColumn(name="member_type",type="string",columnDefinition="ENUM('ANONYMOUS','FREE','PREMIUM')") |
| Comments |
| Comment by Benjamin Eberlei [ 15/Sep/10 ] |
|
How is ENUM efficient? Its a very bad datatype in my opinion with its sorting strangeness and alter table overhead |
| Comment by Lars Strojny [ 16/Sep/10 ] |
|
The alternative with MySQL is TINYINT, which has the drawback of not being self documenting but also works. But this won't be possible with discriminator columns too. |
| Comment by Marc Hodgins [ 17/Sep/10 ] |
|
Duplicate of |
| Comment by Guilherme Blanco [ 14/Feb/12 ] |
|
Fixed https://github.com/doctrine/doctrine2/commit/e6b99c2059d33db744689001b477e8921c35ebfb |
[DDC-657] DateTime objects casted to string in query results Created: 27/Jun/10 Updated: 14/Jan/12 Resolved: 14/Jan/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | None |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | New Feature | Priority: | Major |
| Reporter: | Tomasz Jędrzejewski | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Linux, PostgreSQL 8.4 |
||
| Description |
|
As we read in the documentation, 'datetime' fields are casted by Doctrine to PHP DateTime class objects. However, when we want to get only certain fields from a table using DQL, Doctrine casts the datetime value to ordinary string. Consider the following example: Column definition /** * @var DateTime $active * * @Column(name="registered", type="datetime") */ private $registered; Query var_dump($em->createQuery('SELECT u.id, u.registered FROM Entities\\User u')->getResult());
Expected result:
Actual result:
If this is an intended feature, first of all, it should be clearly pointed in the documentation that Doctrine types do not apply in such situations, and secondly, I think it is a very bad practice. I use Doctrine and tell him I have a datetime field in order to get Datetime objects automatically, not to deal with manual conversions. |