[DC-1021] i am executing doctrine type query i am geting error please gave me reply Created: 24/Jul/11 Updated: 24/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | cherukuri | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
windows ,wamp,php |
||
| Description |
|
$query = new Doctrine_Query(); |
[DC-962] Broken logic when doctrine translates limit's into subqueries, with joins. (with patch) Created: 02/Feb/11 Updated: 02/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Ben Davies | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Environment: |
All |
||
| Attachments: |
|
| Description |
|
Problem exists when Doctrine formulates a subquery to perform a limit when a join in included. The problem is that the where clause that doctrine creates for the subquery (the WHERE IN clause) is inserted as the first where clause. Consider: select * from table join metadata WITH c = ? where a = ? and b = ? limit 1 with parameters be (1, 2, 3) Doctrine will translate this to
select * from table
join metadata WITH c = ?
where table.id IN (
select id from table
join metadata WITH c = ?
where a = ? and b = ?
limit 1
)
and a = ? and b = ?
Doctrine will duplicate the params (Doctrine_Query_Abstract:969) to (1, 2, 3, 1, 2, 3), but now they are in the wrong order completely. The easy fix is to move the limit subquery to the LAST where clause, which would reuslt in a query like so:
select * from table
join metadata WITH c = ?
where a = ? and b = ?
and table.id IN (
select id from table
join metadata WITH c = ?
where a = ? and b = ?
limit 1
)
Attached is a patch to fix this issue, along with a patch that fixes all unit tests referring to the old query format. |
| Comments |
| Comment by Ben Davies [ 02/Feb/11 ] |
|
upping to blocker since this breaks very basic queries |
[DC-1025] Doctrine is unable to handle table names with spaces Created: 02/Aug/11 Updated: 02/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1, 1.2.2, 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Daniel Borg | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP Version 5.2.14 |
||
| Attachments: |
|
| Description |
|
When trying to query a table which contains spaces I get the following exception I have attached an simple example to reproduce C:\Documents and Settings\daniel\Dokumenter\NetBeansProjects\test>php doctrineTest.php Fatal error: Uncaught exception 'Doctrine_Query_Exception' with message 'Unknown table alias with' in C:\Doctrine-1.2.3\Doctrine\Query\Abstract.php:856 thrown in C:\Doctrine-1.2.3\Doctrine\Query\Abstract.php on line 856 |
[DC-1040] allow queries with table joins across different databases Created: 17/Nov/11 Updated: 17/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | 1.2.3 |
| Type: | Improvement | Priority: | Blocker |
| Reporter: | Fabrice Agnello | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows XP SP3, Apache 2, PHP 5.3, MySQL 5.1.36, Symfony 1.4.8, Doctrine 1.2.3 |
||
| Attachments: |
|
| Description |
|
I'm currently working on a project which relies upon several databases declared in databases.yml in symfony 1.4.8. I was facing an issue that has already been raised by other people, namely that you can't join tables which reference each other among different mysql databases. I've dug a bit in the Doctrine_Query class and came to a solution that is acceptable for us, and allows now to make joins accross databases. Description follows : first change is in the Doctrine_Core class, that gets stuffed with a new constant : this constant allows us to add a new attribute to the databases.yml file as in :
after that, a few changes have been done in the Doctrine_Query class which is attached to this issue for the sake of readability. This may not be optimal, and probably need some regression testing, but it is currently working fine on our test server. after this is done, I was able to issue queries like the following : where the referenced tables are in different databases. The necessary object binding has been done in every model class following the paradigm : Doctrine_Manager::getInstance()->bindComponent('CdcIndInt ', 'gescdc'); I don't know if this description is clear enough, so let me know if something is missing/wrong. |
[DC-701] Aggregates functions do not return proper values when using many relationships and limits Created: 24/May/10 Updated: 01/Nov/10 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | will ferrer | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
XP Xamp |
||
| Attachments: |
|
| Description |
|
Hi All I have encountered a problem that seems very core to the way that doctrine works – if you apply an aggregate function to a column in a table and then join to another table via a many relationship while also using a limit, like so: $q = Doctrine_Query::create();
$q->from('Customer Customer');
$q->addSelect('COUNT(Customer.id) as COUNT_customer_id');
$q->addSelect('Customer_Order.id as order_id');
$q->leftJoin('Customer.Order Customer_Order'); // Many relationship here
$q->limit(20);
It produces this correct DQL: SELECT COUNT(Customer.id) as COUNT_customer_id, Customer_Order.id as order_id FROM Customer Customer LEFT JOIN Customer.Order Customer_Order LIMIT 20 However the SQL it produces will not return an accurate count – the count is restricted by the limit: SELECT COUNT(p.id) AS p__0, p2.id AS p2__1
FROM product_customers p
LEFT JOIN product_orders p2 ON p.id = p2.customer_id
WHERE p.id IN ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20')
This produces a count of 21 instead of what it should be (1000). The reason for this is because Doctrine's internal functionality does an intermediary query where it gets gets the ids needed from the customer table in order to use them as the IN portion of the constraints on the final query – like so: SELECT DISTINCT p3.id FROM product_customers p3 LIMIT 20 It may seem strange that I am applying a limit to a query which will aggregate to 1 to row . In the actual queries that alerted me to this problem I am using a group by. The reason I am not reporting this bug with a group by in my example however is that you can not use a group by with a many relationship and a limit in doctrine 1.2.2 as it works currently (see bug: Here is my sample schema in case its helpful. detect_relations: false package: Example options: type: INNODB charset: utf8 Order: tableName: orders columns: order_id: type: integer(4) primary: true notnull: true customer_id: type: integer(4) order_date: timestamp relations: Customer: type: one local: customer_id foreign: customer_id options: type: InnoDB Customer: tableName: customers columns: customer_id: type: integer(4) primary: true notnull: true autoincrement: true firstname: type: string(45) lastname: type: string(45) streetaddress: type: string(45) city: type: string(45) state: type: string(45) postalcode: type: string(45) relations: Order: type: many local: customer_id foreign: customer_id options: type: InnoDB Thanks much. Will Ferrer edit: split SQL code to make the discussion readable without huge horizontal scrolling... |
| Comments |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
Is this still a problem? I am not sure if this can be patched easily. The limit subquery algorithm is flawed deeply but also a core part of the current way Doctrine 1 works. |
| Comment by will ferrer [ 08/Jun/10 ] |
|
Hi Jon This bug is still an issue for me but I think it may be VERY hard to patch since it seems very core to the way Doctrine 1 works. The project I am working on at the moment is a visual query builder that is highly reliant on Doctrine. In order to prevent users from making queries that would trigger this bug I am currently giving an alert when ever a query that would trigger this bug is created. It would be great if this were patchable but if not I should be able to get by. Does Doctrine 2 fix this problem? Thanks for the help. Will Ferrer |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
In Doctrine 2 the limit subquery algorithm does not exist. It is now up to the developer to write the query to handle the scenario instead of Doctrine "trying" to automate it for you. Since the situation where it is needed it is so rare, and each case can be slightly different it is better to let the developer handle it in those cases. |
| Comment by will ferrer [ 08/Jun/10 ] |
|
Hi Jon Does that mean that Doctrine 2 can no longer intelligently handle limits with many relationships, and doesn't have the ability to hydrate a return with sub arrays in it for many relationships? Thanks again for your help. Will Ferrer |
| Comment by Jonathan H. Wage [ 09/Jun/10 ] |
|
That is correct. We do not automatically try and limit the relationships with a "limit subquery" as it causes more problems then it helps. |
| Comment by will ferrer [ 10/Jun/10 ] |
|
Hi Jon I was thinking about what you said here – that the "limit subquery" causes more harm than good. It occur to me that I really do like being able to use this method (it comes in very handy very often) but some times it would really help to be able to turn it off (the bug in this thread is a good example such a time). So I figured why not just make an option to turn it off and have the best of both worlds? I looked at the code and found it was really very easy to put in a property which can be set on the query object to enable or disable the use of the limit subquery. I made the change in my code base and found it very useful for several situations I was dealing with in my own project. The one thing I couldn't do is make a test case for this new feature – I couldn't find an existing test case that was actually triggering the limit subquery as I understood it to work (I couldn't find a test case that would put an WHERE IN constraint with all the ids gathered in the limit subquery. I tried some test cases that I THOUGHT would activate this feature but it didn't seem that they did). After adding this feature to my code base I also wanted a new hydrator – one that worked like scalar but would put in array key names that were the same as the ones you would see in HYDRATE_ARRAY. I noticed that HYDRATE_SCALAR already had the ability to do this but it required that a value of false be passed into the $aliasPrefix argument of the _gatherRowData function. I made a custom hydrator I call HYDRATE_ARRAY_SHALLOW that passes in this false value. I then realized this might be handy to add to doctrine so I integrated it into my code base and made a few test cases for it. There are 2 patches I am now attaching this to thread: disableLimitSubquery_2010-06-10_Doctrine_1.2_SVN.patch – this patch adds the disableLimitSubquery property to query objects so that users can turn off the use of the subquery for those times when they don't want to use that behavior (fixing the bug in this thread and probably others) and disableLimitSubquery_and_HYDRATE_ARRAY_SHALLOW_2010-06-10_Doctrine_1.2_SVN.patch – this is the same as the first patch but also contains the HYDRATE_ARRAY_SHALLOW hydration type I mentioned above (which tends to go well with disableLimitSubquery turned on). I put these in 2 patches incase you liked 1 feature but disliked the other. If you like either of this features I would be very happy to see them added to doctrine. Also if you have any advice on how to improve these features (or info on how to make a good test case for disableLimitSubquery) please let me know. Hope you are well. Will Ferrer |
| Comment by will ferrer [ 10/Jun/10 ] |
|
Reopened because I added a patch that I think in essence fixes the issues. |
| Comment by Jonathan H. Wage [ 01/Sep/10 ] |
|
Thanks for the issue and patches. Fixed here http://github.com/doctrine/doctrine1/commit/2ad78e62e360133efc04bf6897bf679c7f3d833b |
| Comment by will ferrer [ 01/Sep/10 ] |
|
individual patch for this issue with out other features included |
| Comment by will ferrer [ 01/Nov/10 ] |
|
adding test cases for these features |
| Comment by will ferrer [ 01/Nov/10 ] |
|
reopened because I posted some test cases to add to doctrine along with the patchs previously posted |
[DC-932] Queries fail when a model contains underscore and we try to apply a limit Created: 19/Nov/10 Updated: 19/Nov/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Noel GUILBERT | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Doctrine 1.2, Symfony 1.4.6, MySQL, Postgresql |
||
| Description |
|
Actually, I've a dead simple schema.yml, with two tables: T_Media: name: string(25) J_Acl: I have some fixtures: J_Acl: And then, the DQL query I want to execute: "From T_Media m INNER JOIN m.J_Acl order by m.created_at limit 1" But if I run this query, for instance in CLI, I got an error: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test_noel.t2__media' doesn't exist. Notes:
|
[DC-1058] Warning: Invalid argument supplied for foreach() in SqlWalker.php line 899 Created: 29/Jul/12 Updated: 29/Jul/12 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Cucer | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | paginator | ||
| Environment: |
Linux, Ubuntu 12, php 5.4 |
||
| Description |
|
Hallo, i get the error Here is the line Here are the relations and the query Here is the dump of $assoc before warning array(16) { ["orphanRemoval"]=> |
[DC-1052] limit() get lost on multiple joins Created: 20/Mar/12 Updated: 20/Mar/12 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Michael Kempf | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
$strSql = UserFeedTable::getInstance() string(1075) "SELECT u.id AS u_id, u.name AS uname, u.image AS uimage, u.lead AS ulead, u.headline AS uheadline, u.sort AS usort, u.is_active AS uis_active, u.is_favorite AS uis_favorite, u.feed_id AS ufeed_id, u.profile_id AS uprofile_id, u.category_id AS ucategory_id, u.created_at AS ucreated_at, u.updated_at AS uupdated_at, f.id AS fid, f.url AS furl, f.name AS fname, f.created_at AS fcreated_at, f.updated_at AS fupdated_at, f2.id AS f2id, f2.lead AS f2lead, f2.description AS f2description, f2.image AS f2image, f2.pub_date AS f2pub_date, f2.link AS f2link, f2.feed_id AS f2feed_id, f2.created_at AS f2created_at, f2.updated_at AS f2updated_at, f3.id AS f3id, f3.profile_id AS f3profile_id, f3.feed_item_id AS f3feed_item_id, f3.created_at AS f3created_at, f3.updated_at AS f3_updated_at FROM user_feed u LEFT JOIN feed f ON u.feed_id = f.id LEFT JOIN feed_item f2 ON f.id = f2.feed_id LEFT JOIN favorite f3 ON f2.id = f3.feed_item_id WHERE u.id IN ('7', '8', '9', '10', '11') AND (u.profile_id = ? AND u.is_active = ?)" As you can see, the limit is missing. |
[DC-690] Wrong data type for oracle integer Created: 18/May/10 Updated: 08/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Arian Maykon de Araújo Diógenes | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Trying to migrate from doctrine 1 to 1.2 and this problem came up to me, i cant map a column to integer(7) (which should create a number(7) column) using Oracle, he always create a NUMBER(20) field. Taking a look at Doctrine_DataDict_Oracle i realize the problem is here. |
| Comments |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
We made a bunch of changes/fixes related to oracle. This was to fix another bug I believe. I can't remember the user that is responsible for these changes. Does anyone else remember or know anything? |
[DC-802] Alias in select and having Created: 28/Jul/10 Updated: 07/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Vasiliy Altunin | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows XP sp3 |
||
| Description |
|
i have query $q = Doctrine_Query::create() When it runs i have error: <b>Fatal error</b>: Uncaught exception SQL for it looks like: SELECT g.grid AS g_grid, g.fam AS gfam, g.nam AS g_nam, g.otc AS But i need Query looks like: SELECT g.grid AS g_grid, g.fam AS gfam, g.nam AS g_nam, g.otc AS This query run fine and give me what i need. Doctrine dont use 'md' alias instead it convert it to 'p__0' |
[DC-747] Sequence name of build process is different to the one used in UnitOfWorks (based on DC521 with updated TestCase) Created: 17/Jun/10 Updated: 17/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3, 1.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Enrico Stahn | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
doctrine 1.2.4, symfony 1.4, snow leopard, php 5.3.1, postgresql 8.3 |
||
| Attachments: |
|
| Description |
|
I moved our project from doctrine 1.2.1 to 1.2.4. The build process stops because of this patch. We are using primary keys with an alias. It seems that the generation of the sequence name in the build-process is different to the one used in UnitOfWorks. Example: Authority: name: { type: string }This will generate a sequence called "authority_a_id", but it will try no "currval" the sequence "authority_id". I'll try to provide a UnitTest. The current seems broken. php -l Ticket/DC521TestCase.php Parse error: syntax error, unexpected $end, expecting T_FUNCTION in Ticket/DC521TestCase.php on line 143 |
| Comments |
| Comment by Enrico Stahn [ 17/Jun/10 ] |
|
Here is the test updated with the current ticket number. |
| Comment by Enrico Stahn [ 17/Jun/10 ] |
|
Updated. Now it should work/not work as expected. |
| Comment by Enrico Stahn [ 17/Jun/10 ] |
|
This isn't a blocker anymore because of the workaround i've found.
Example: Authority: name: { type: string } |
[DC-921] The ability to add WITH ROLLUP to a group by in a query Created: 09/Nov/10 Updated: 18/Nov/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | will ferrer | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
XP XAMP |
||
| Description |
|
I figured it would be handy to have a WITH ROLLUP be add able to the group by clause. I added this feature but I can't post the patch because my patches are starting to run together - the syntax with in the generated patch would also contain parts of other patches I have posted to jira but have not yet been included in the doctrine svn. I still wanted to make this post because it will give me a ticket number to base my test cases around. Will Ferrer |
| Comments |
| Comment by will ferrer [ 09/Nov/10 ] |
|
In order to illustrate what this patch fixes I am posting my test case for the patch below <?php /* * $Id$ * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the LGPL. For more information, see * <http://www.doctrine-project.org>. */ /** * Doctrine_Ticket_DC921_TestCase * * @package Doctrine * @author Will Ferrer * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @category Object Relational Mapping * @link www.doctrine-project.org * @since 1.0 * @version $Revision$ */ class Doctrine_Ticket_DC921_TestCase extends Doctrine_UnitTestCase { public function testAggregateValueMappingSupportsLeftJoinsWithRollUp() { $q = new Doctrine_Query(); $q->select('MAX(u.name), u.*, p.*')->from('User u')->leftJoin('u.Phonenumber p')->groupby('u.id'); $q->setWithRollUp(true); $this->assertEqual($q->getSqlQuery(), 'SELECT e.id AS e__id, e.name AS e__name, e.loginname AS e__loginname, e.password AS e__password, e.type AS e__type, e.created AS e__created, e.updated AS e__updated, e.email_id AS e__email_id, p.id AS p__id, p.phonenumber AS p__phonenumber, p.entity_id AS p__entity_id, MAX(e.name) AS e__0 FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE (e.type = 0) GROUP BY e.id WITH ROLLUP'); } } |
| Comment by will ferrer [ 18/Nov/10 ] |
|
I have updated my implemenation of this feature. Here is the new test case: <?php /* * $Id$ * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the LGPL. For more information, see * <http://www.doctrine-project.org>. */ /** * Doctrine_Ticket_DC921_TestCase * * @package Doctrine * @author Will Ferrer * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @category Object Relational Mapping * @link www.doctrine-project.org * @since 1.0 * @version $Revision$ */ class Doctrine_Ticket_DC921_TestCase extends Doctrine_UnitTestCase { public function testAggregateValueMappingSupportsLeftJoinsWithRollUp() { $q = new Doctrine_Query(); $q->select('MAX(u.name), u.*, p.*')->from('User u')->leftJoin('u.Phonenumber p')->groupby('u.id'); $q->withRollUp(); $this->assertEqual($q->getSqlQuery(), 'SELECT e.id AS e__id, e.name AS e__name, e.loginname AS e__loginname, e.password AS e__password, e.type AS e__type, e.created AS e__created, e.updated AS e__updated, e.email_id AS e__email_id, p.id AS p__id, p.phonenumber AS p__phonenumber, p.entity_id AS p__entity_id, MAX(e.name) AS e__0 FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE (e.type = 0) GROUP BY e.id WITH ROLLUP'); $this->assertEqual($q->getDql(), 'SELECT MAX(u.name), u.*, p.* FROM User u LEFT JOIN u.Phonenumber p GROUP BY u.id WITH ROLLUP'); } public function testAggregateValueMappingSupportsLeftJoinsWithRollUpDql() { $q = new Doctrine_Query(); $q->parseDqlQuery("SELECT MAX(u.name), u.*, p.* FROM User u LEFT JOIN u.Phonenumber p GROUP BY u.id WITH ROLLUP"); $this->assertEqual($q->getSqlQuery(), 'SELECT e.id AS e__id, e.name AS e__name, e.loginname AS e__loginname, e.password AS e__password, e.type AS e__type, e.created AS e__created, e.updated AS e__updated, e.email_id AS e__email_id, p.id AS p__id, p.phonenumber AS p__phonenumber, p.entity_id AS p__entity_id, MAX(e.name) AS e__0 FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE (e.type = 0) GROUP BY e.id WITH ROLLUP'); $this->assertEqual($q->getDql(), 'SELECT MAX(u.name), u.*, p.* FROM User u LEFT JOIN u.Phonenumber p GROUP BY u.id WITH ROLLUP'); } } |
[DC-968] I18n and PostgreSQL and DmVersionable Created: 03/Nov/10 Updated: 15/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sasha | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.2, PostgreSQL 8.4.5, Diem 5.1.x |
||
| Description |
|
I am using PHP 5.3.2 and PostgreSQL 8.4.5, Diem passed all checks in green - OK. I started with "A week of Diem Ipsum" and all went ok until I reached building of blog engine. Blog engine example fails in step: php symfony doctrine:migrate with error message: The following errors occurred:
* SQLSTATE[42830]: Invalid foreign key: 7 ERROR: there is no unique constraint matching given keys for referenced table "article_translation". Failing Query: "ALTER TABLE article_translation_version ADD CONSTRAINT article_translation_version_id_article_translation_id FOREIGN KEY (id) REFERENCES article_translation(id) ON UPDATE CASCADE ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE"
* SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE INDEX article_image ON article (image)"
* SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE INDEX article_author ON article (author)"
* SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE INDEX article_translation_id ON article_translation (id)"
* SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block. Failing Query: "CREATE INDEX article_translation_version_id ON article_translation_version (id)"
I removed i18n support in blog engine example and after that migrate went ok. But in Admin interface when I wanted to add SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block. Again I reviewed the model and removed DmVersionable, migrated again and after that I could loremize or create articles without errors. Additionally, not related directly to this blog engine example but doctrine related, I noticed errors in Diem Admin interface 500 | Internal Server Error | Doctrine_Connection_Pgsql_Exception
SQLSTATE[08P01]: <>: 7 ERROR: bind message supplies 1 parameters, but prepared statement "pdo_stmt_00000008" requires 2
Are this bugs corrected? |
[DC-911] A way of checking if a model has been loaded via the loaded loadModels method Created: 01/Nov/10 Updated: 02/Nov/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | will ferrer | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
XP Xamp |
||
| Attachments: |
|
| Description |
|
I needed a way to check if a model has been loaded — checking to see if the model was included in the _loadedModelFiles property of core. I put in a simple function that allows me to test for this. I will post the patch after building a test case for this ticket. Will Ferrer |
| Comments |
| Comment by will ferrer [ 02/Nov/10 ] |
|
Changed the name of the method to modelLoaded (seemed more appropriate) |
[DC-904] Doctrine_Query (execute / fetchOne) memory leak Created: 29/Oct/10 Updated: 03/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Marcin Dryka | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | None | ||
| Environment: |
$ ./symfony -V $ php -v Ubuntu Server (lucid) |
||
| Description |
|
I've created new symfony 1.4.8 project: $ ./symfony -V $ php -v and set the database schema as follows: $ cat config/doctrine/schema.yml I created a task that contains a Doctrine_query call (...) while(1) if (false !== $o)) { $o->free(true); }unset($q, $o); printf("Delta: %s Value: %s\n", Unfortunately, memory usage is increasing: Tested with and without data in database - result is the same. |
| Comments |
| Comment by sonic wang [ 03/Dec/10 ] |
|
i found this bug too. $rcs = $query->execute(array(),\Doctrine_Core::HYDRATE_ON_DEMAND); hydrate not cause memory leak bug hydrate record will cause leak so iterate Doctrine_collection will cause memory leak |
| Comment by Marcin Dryka [ 03/Dec/10 ] |
|
Changing hydration doesn't work for me. Same result for: |
[DC-875] One-to-many relationship returns Doctrine_Record instead of Doctrine_Collection Created: 30/Sep/10 Updated: 14/Sep/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Patrik Ã…kerstrand | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Environment: |
WAMP: |
||
| Description |
|
I've run into a bit of a snag in my application where a relationship defined as a one-to-many relationship returns a model object (instance of Doctrine_Record) instead of a Doctrine_Collection when I try to access it as $model->RelatedComponent[] = $child1. This, of course, yields an exception like so: Doctrine_Exception: Add is not supported for AuditLogProperty }} This is what my yaml-schema looks like (excerpt): schema.yml AuditLogEntry:
tableName: audit_log_entries
actAs:
Timestampable:
updated: {disabled: true}
columns:
user_id: {type: integer(8), unsigned: true, primary: true}
id: {type: integer(8), unsigned: true, primary: true, autoincrement: true}
type: {type: string(255), notnull: true}
mode: {type: string(16)}
article_id: {type: integer(8), unsigned: true}
comment_id: {type: integer(8), unsigned: true}
question_id: {type: integer(8), unsigned: true}
answer_id: {type: integer(8), unsigned: true}
message_id: {type: integer(8), unsigned: true}
indexes:
# Must index autoincrementing id-column since it's a compound primary key and
# the auto-incrementing column is not the first column and we use InnoDB.
id: {fields: [id]}
type: {fields: [type, mode]}
relations:
User:
local: user_id
foreign: user_id
foreignAlias: AuditLogs
type: one
onDelete: CASCADE
onUpdate: CASCADE
AuditLogProperty:
tableName: audit_log_properties
columns:
auditlog_id: {type: integer(8), unsigned: true, primary: true}
prop_id: {type: integer(2), unsigned: true, primary: true, default: 1}
name: {type: string(255), notnull: true}
value: {type: string(1024)}
relations:
AuditLogEntry:
local: auditlog_id
foreign: id
type: one
foreignType: many
foreignAlias: Properties
onDelete: CASCADE
onUpdate: CASCADE
Now, if we look at the generated class-files, it looks fine: Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml /** * @property integer $user_id * @property integer $id * @property string $type * @property string $mode * @property integer $article_id * @property integer $comment_id * @property integer $question_id * @property integer $answer_id * @property integer $message_id * @property integer $news_comment_id * @property User $User * @property Doctrine_Collection $Properties * @property Doctrine_Collection $Notifications */ abstract class BaseAuditLogEntry extends Doctrine_Record /** * @property integer $auditlog_id * @property integer $prop_id * @property string $name * @property string $value * @property AuditLogEntry $AuditLogEntry */ abstract class BaseAuditLogProperty extends Doctrine_Record However, when I later try to add properties I get the exception posted in the beginning of the question: Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml $auditLog = new AuditLogEntry(); $prop1 = new AuditLogProperty(); $prop1->name = 'title'; $prop1->value = $this->Content->title; $prop2 = new AuditLogProperty(); $prop2->name = 'length'; $prop2->value = count($this->Content->plainText); $auditLog->Properties[] = $prop1; $auditLog->Properties[] = $prop2; $auditLog->save(); If I do the following: Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml var_dump(get_class($auditLog->Properties)); I get that Properties is of type AuditLogProperty, instead of Doctrine_Collection. I use version 1.2.3 of Doctrine. |
| Comments |
| Comment by Trevor Wencl [ 14/Sep/11 ] |
|
I am having the same issue and it is killing my application. Using your example, when I call:
... and there are no AuditLogProperty records, I would expect either an empty Doctrine_Collection or null, but instead I get a new instance of AuditLogProperty with null values for the properties. |
[DC-869] calling getLastModified() after saving the object without any modifications returns the last modified fields Created: 17/Sep/10 Updated: 17/Sep/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Keszeg Alexandru | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
symfony-1.4.6 |
||
| Description |
|
_resetModified() function in Record.php fails to reset $this->_lastModified the second time the object is saved. |
[DC-866] Bug In Debian "Can't parse dsn.."! Created: 13/Sep/10 Updated: 15/Sep/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | sonic wang | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian4 PHP 5.3.1 |
||
| Description |
|
config dsn: sqlite:///root/db3.db i find parse_url will cause the problem ------------------ this fix will be correct in windows ,because dsn is sqlite://C:/aa/wafdb.db3 -------------------------------------------------------------- but in debian it will be fail. |
[DC-856] Doctrine_Core::getPath() not working when inside phar, due to a bug in php Created: 03/Sep/10 Updated: 04/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Miha Vrhovnik | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
It seems that there is a bug in php, and realpath doesn't work when path is inside of phar archive. can be easily changed to |
| Comments |
| Comment by Pierre-Gildas MILLON [ 04/Jan/11 ] |
[DC-854] having not work as expected and described Created: 02/Sep/10 Updated: 02/Sep/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Petronel MALUTAN | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
$this->q1 = Doctrine_Query::create() "SELECT m.id AS m_id, m.questionaire AS mquestionaire, m.aszero AS maszero, COUNT(r2.id) AS r2_0 FROM machine m LEFT JOIN relation r ON (r.machine_id = m.id) LEFT JOIN ref r2 ON ((r2.id = r.ref_id AND r2.part_number LIKE "B%")) GROUP BY m.questionaire HAVING bref=0 " but it should be "SELECT m.id AS m_id, m.questionaire AS mquestionaire, m.aszero AS maszero, COUNT(r2.id) AS r20 FROM machine m LEFT JOIN relation r ON (r.machine_id = m.id) LEFT JOIN ref r2 ON ((r2.id = r.ref_id AND r2.part_number LIKE "B%")) GROUP BY m.questionaire HAVING r2_0=0 " http://www.doctrine-project.org/docu mentation/manual/1_1/en/dql-doctrine-query-language%3Agroup-by,-having-clauses With kind regards Petronel I use symfony 1.4 and not sure if doctrine is 1... |
[DC-850] Error in Doctrine method execute() Created: 31/Aug/10 Updated: 31/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | fernando guerrero | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In the execute method when doctrine runs a sql query, the process is In the line $stmt->fetch(Doctrine_Core::FETCH_ASSOC); I appreciate the partnership that I can provide. Thanks |
| Comments |
| Comment by Jonathan H. Wage [ 31/Aug/10 ] |
|
Can you provide some more information? |
[DC-853] I am using symfony 1.4 Created: 01/Sep/10 Updated: 02/Sep/10 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Petronel MALUTAN | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Symfony 1.4 |
||
| Description |
|
$q1 = Doctrine_Query::create() $q2 = Doctrine_Query::create() $this->reports->setQuery(Doctrine_Query::create() This outputs Couldn't find class (SQL How to use in such a case ? |
| Comments |
| Comment by Jonathan H. Wage [ 01/Sep/10 ] |
|
What is the SQL: syntax you are using here? That is definitely not something that is "supported" |
| Comment by Petronel MALUTAN [ 02/Sep/10 ] |
|
Dear Jonathan The example I've tried is based on the : My problem started from a SQL query created in phpmyadmin, I've tried to convert to doctrine. Following is the mysql query which nicely work: select * from (select m1.questionaire, COUNT(f1.id) AS n1_refs left join (select m2.questionaire, COUNT(f2.id) AS n2_refs and my trying was to create 2 easier DQL queries and than join them: $this->q = Doctrine_Query::create() $this->q1 = $this->q->createSubquery() $this->q2 = $this->q->createSubquery() $this->q->from($this->q1->getDql() . ' q1)') echo $this->q->getSqlQuery(); die; This is outputting : 500 | Internal Server Error | Doctrine_Exception so please tell me is it now more clear and make some sense ? With kind regards Petronel |
| Comment by Jonathan H. Wage [ 02/Sep/10 ] |
|
Can you make a test case that I can run on my machine to see the problem? |
[DC-847] Can not set a default value of 'CURRENT_TIMESTAMP' in a table definition for mysql Created: 31/Aug/10 Updated: 25/Sep/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | will ferrer | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
XAMP Windows |
||
| Attachments: |
|
| Description |
|
Hi I recently I discovered that I needed o put a default value of 'CURRENT_TIMESTAMP' on some of my fields. This was breaking the build of my mysql base for 2 different reasons – for one columns with a type of timestamp were being switched instead to have a type of datetime, and for two the words: CURRENT_TIMESTAMP were being quote encapsulated in the create table statement. I looked around a bit and couldn't find a solution so I made a patch to fix the issue. This patch however broke some test cases that were expecting datetimes to be returned instead of timestamps (so i fixed the tests). I may be breaking something that I am not aware of by doing this, or perhaps there was another solution to the problem that I could not find – if any one has any input on this I would appreciate it. I will post my patch in this thread but it is worth mention that it contains several bug fixes and a few new features which I have posted in other threads several months ago but never heard back regarding (most notably, beyond bug fixes it introduces a new hydration type and allows the disabling of the some times useful some times problematic limit subquery feature of doctrine). Thanks to all who have any input. Will Ferrer |
| Comments |
| Comment by will ferrer [ 31/Aug/10 ] |
|
Here is the patch |
| Comment by will ferrer [ 01/Sep/10 ] |
|
Found a small error in my last patch (some debug code I hadn't removed) and added some more comments (links to jira above each change) to clarify the fixes and new features the patch has in it. |
| Comment by will ferrer [ 01/Sep/10 ] |
|
individual patch for this issue with out other features included |
| Comment by Jonathan H. Wage [ 02/Sep/10 ] |
|
Hi, this one breaks the tests and backwards compatibility. Previously if you have a timestamp field in Doctrine, it would create a datetime column in mysql. Now it is creating a timestamp column. I don't think we can make this change in a stable version. |
| Comment by Jonathan H. Wage [ 02/Sep/10 ] |
|
At any rate, it is breaking the tests still. If we do decide to make the change, can you run all the tests and fix any of the other failures? |
| Comment by will ferrer [ 02/Sep/10 ] |
|
Hi Jon I added more test case fixes to the patch. I can see how this would still cause backwards compatibility issues though – any one who built their db using the none patched version of doctrine would end up with different field types if they rebuilt using the patched version and this could affect the functionality of their existing code. Thanks for the help Hope you are well. Will |
| Comment by Jonathan H. Wage [ 03/Sep/10 ] |
|
Can you think of anyway it could be tweaked so that it is BC? |
| Comment by will ferrer [ 03/Sep/10 ] |
|
Good question... Here is an idea – how about I put a flag in the options for the field that changes the behavior. So if some one wants to use real timestamps instead of datetime fields they could set an option of: "useRealTimestamps : true" on the field. I think that would be a good solution because by default everything would work as does is now (providing BC) but users could switch it over if they required the additional functionality that timestamps provide. What do you think? Will |
| Comment by will ferrer [ 11/Sep/10 ] |
|
Hi Jon Here is a backwards compatible patch using the method I proposed in my last comment. To make a timestamp field use a type of timestamp (instead of datatime) include an option of: userealtimestamp=>true Let me know if you think this method will work out. Hope you are well. Will |
| Comment by will ferrer [ 25/Sep/10 ] |
|
I found some issues with this patch when I moved it off my local machine our production server – there was a case sensitivity issue that I have since resolved. Here is the fixed version. |
[DC-844] DataDict for MySQL excludes the possibility to have an actual floating point column Created: 27/Aug/10 Updated: 27/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Roberto González | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Not environment dependent |
||
| Description |
|
Extracted from Doctrine/DataDict/Mysql.php: Mysql.php case 'float': $length = !empty($field['length']) ? $field['length'] : 18; $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine_Core::ATTR_DECIMAL_PLACES); return 'FLOAT('.$length.', '.$scale.')'; case 'double': $length = !empty($field['length']) ? $field['length'] : 18; $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine_Core::ATTR_DECIMAL_PLACES); If the user does not specify length and decimal places, MySQL creates a floating point number. However Doctrine behavior forces FLOATs and DOUBLEs to be fixed-width. |
[DC-1024] i am executing Created: 22/Jul/11 Updated: 26/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | cherukuri | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
$query = new Doctrine_Query(); $query->andWhere("s.company_id=".$parentId) |
[DC-1002] Typos in filename and php tags Created: 02/May/11 Updated: 02/May/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | nervo | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Two typos in Doctrine files prevents usage of symfony core_compile.yml system, or any similar compiler system :
|
[DC-966] Default Order By incorrectly propagating to relations Created: 12/Feb/11 Updated: 12/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jason Yang | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 7 WAMP, PHP 5.3, MySQL 5.1.36, Apache 2.2.11 |
||
| Description |
|
Symfony Version 1.4.9 ORM: Doctrine Schema.yml: Table1: sort_order: { string(255), notnull: true }Table2: value: { string(255), notnull: true } relations: This generates models and I can see the following: BaseTable?1.class.php: $this->option('sort_order', 'sort_order ASC'); BaseTable?2.class.php: No option for sort_order But when I run the following, I get errors: Doctine::getTable('Table1') Error: Column not found: 1054 Unknown column 't2.sort_order' in 'order clause' Looking at the sql executed, it included t1.sort_order ASC, but also incorrectly added t2.sort_order ASC as well even though it was never defined anywhere. I am unsure if this is a Doctrine problem or a symfony one, so I will post i on both bug tracking systems. |
[DC-957] MSSQL doctrine inner join group by problem Created: 20/Jan/11 Updated: 20/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Mehmet Uysal | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
mssql, doctrine 1.2.3 , symfony |
||
| Description |
|
$q = Doctrine_Query::create() SELECT i should create SELECT MSSQL doesnt support this use of group by sql. Id have to be in aggregrate function or group by. I do not need id but doctrine creates it in sql. "invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause." |
[DC-954] tinyint(1) with default value in schema.yml generates blank default value, gives SQLSTATE[42000] Created: 09/Jan/11 Updated: 09/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Colin Stuart | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Win7 64-bit |
||
| Description |
|
doing a Foo: results in a blank value generated for the default keyword, and the following error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = INNODB' at line 1. Failing Query: "CREATE TABLE foo (id BIGINT AUTO_INCREMENT, bar tinyint(1) DEFAULT , PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = INNODB". Failing Query: CREATE TABLE foo (id BIGINT AUTO_INCREMENT, bar tinyint(1) DEFAULT , PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 ENGINE = INNODB I've also tried combinations of tinyint, tinyint(4), single-quoting the default value, and different default values. Changing the type to int makes the issue disappear |
[DC-953] Doctrine fails when using link() on OneToMany because of failing save Created: 04/Jan/11 Updated: 04/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Buster Neece | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.2.10, MySQL database connection |
||
| Attachments: |
|
| Description |
|
I have continually run into a very particular bug when using OneToMany relationships between Doctrine tables. When attempting to call "link()" to generate a relationship between records in related tables, Doctrine attempts to set the ID of the "one" portion of the record to 0, then save it. This is best demonstrated by the sample YML and PHP that I have attached. It establishes a OneToMany relationship where the "one" table has another foreign key constraint. This causes the DB to trigger a foreign key constraint error when Doctrine tries to set the ID to 0, making the error easier to see. From looking into the relevant sections of the codebase, the following appears to be happening:
I've made it this far in looking into it, but for the life of me I can't figure out what is triggering the identifier being reset in this case. I should note, however, that it happens consistently in every such situation on every server I've tested it on. |
| Comments |
| Comment by Buster Neece [ 04/Jan/11 ] |
|
Further research into the issue has revealed the exact area where the problem is being caused: Doctrine_Collection (272): Function "setReference", called from Doctrine_Relation_ForeignKey (80). For each of the elements in the collection (in this case, the related items), that function is setting the "reference field" value to the record being related to. Apparently, it's getting the field names confused, because it's overwriting "id" with a reference to the entire related object, which has a different ID. I can't tell if this is only an issue when both the relation tables use the same identifier ("id"), but this is surely common enough to warrant a fix. |
[DC-951] Error in generating the field size and error in the generation of the date fields for postgres Created: 24/Dec/10 Updated: 24/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | 1.2.4 |
| Type: | New Feature | Priority: | Major |
| Reporter: | fernando guerrero | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
apacha2, linux, Symfony 1.4 |
||
| Description |
|
collaboration of vtamara@pasosdejesus.org and jeronimo0000@gmail.com While we developed a tool with symfony 1.4 and postgresql database we found errors in the generated schema.yml which I describe below 1 - Error in generating of field size of varchars We found the following solution — Doctrine/Import/Pgsql.php.orig 2010-12-23 17:48:00.160271000 -0500
$decl = $this->conn->dataDict->getPortableDeclaration($val); |
[DC-942] fromArray makes unnessesary cals to database Created: 03/Dec/10 Updated: 03/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Ivo Võsa | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
If I do toArray(true) on record with realtions and later fromArray($array, true) on with same data unnessesary calls to database are made. $message = new Message(); $message->Sender = new User(); // if i leave out this line sender will first get loaded from database and then overwritten with provided data $message->Receiver = new User(); // if i leave out this line receiver will first get loaded from database and then overwritten with provided data $message->fromArray($data); In Doctrine_Record::fromArray() if ($deep && $this->getTable()->hasRelation($key)) { if ( ! $this->$key) { --> data gets loaded from db here, refreshRelated is not even executed. $this->refreshRelated($key); } ... } Is this desired behavour? Wouldnt it be smarter to create empty object automaticly instead of loading it from db? |
[DC-939] Patch for Doctrine ..... to identify in some cases autoincremented fields in oracle Created: 25/Nov/10 Updated: 24/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Edwin Alexander Herrera Saavedra | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP Version 5.2.4-2ubuntu5.10 |
||
| Description |
|
Patch for Doctrine ..... to identify in some cases autoincremented Doctrine/Import/Oracle.php // Heuristic to check autoincremented fields. $res2 = $this->conn->fetchColumn($q); } return $descr; |
| Comments |
| Comment by Edwin Alexander Herrera Saavedra [ 24/Dec/10 ] |
|
when new tables are created, the auto-increment is shown in all fields of the table in the schema, to avoid this problem has generated the following improvements to a validation of the auto-increment column is only when the primary key Solution found thanks to if($descr[$val['column_name']]['primary']==1){ "; } |
[DC-1038] Missing Foreign Key Constraint in SQL Created: 24/Sep/11 Updated: 24/Sep/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Stephan | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, I have the problem, that a foreign key constraint is not created in the SQL schema. This occurs, when the primary key is not the column 'id'. Here is an example: User: Address: The foreign key from contacts to users is not created in der SQL schema. But if I delete the attribute 'primary' at the column 'user_id' (and a primary key 'id' will generated), everything is okay. Can you help me please? With kind regards |
[DC-1033] [PATCH] Use multibyte version of strtolower Created: 28/Aug/11 Updated: 28/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Jonas Flodén | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.7, Symfony 1.4.13 |
||
| Attachments: |
|
| Description |
|
While trying to develop a new Symfony frontend to an existing database - whcih unfortunately contains non-ascii character names - I ran into a lot of problems where non-ascii characters had been mangled. |
| Comments |
| Comment by Jonas Flodén [ 28/Aug/11 ] |
|
Here is a Git pull request with the same patch: |
[DC-1023] i am executing doctrine type query i am geting error please gave me reply my query i am typed in descrition field Created: 24/Jul/11 Updated: 26/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | cherukuri | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
$query = new Doctrine_Query(); |
[DC-1046] Connection MSSQL replaceBoundParamsWithInlineValuesInQuery Created: 15/Dec/11 Updated: 15/Dec/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Peter Eisenberg | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Revision: 104 |
||
| Attachments: |
|
| Description |
|
Hello, We found a bug in Doctrine1 MSSQL Connection. Please find the patch for it, I hope it helps to you as well. Kind regards |
| Comments |
| Comment by Peter Eisenberg [ 15/Dec/11 ] |
|
Small changes: please use the following instead of the original: another case you got the following error: Use of undefined constant xxx - assumed xxx. Kind regards, |
[DC-1043] Error:"When using..ATTR_AUTO_ACCESSOR_OVERRIDE you cannot.. name "data" ..." when running doctrine:build-schema ... except I'm NOT using that word Created: 30/Nov/11 Updated: 01/Dec/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Maurice Stephens | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Mac OSX 10.6.8 running MAMP Pro 2.0.5 with PHP 5.3.6 ... this is a local symfony install which is also using the apostrophe cms. |
||
| Description |
|
Was able to resolve this - see comment below - but still think it counts as a bug since the source of the error is so unclear Hello, Which would be clear enough except I'm NOT using "data" as a field name in my schema file: here's what I'm using: sfTravelLodgingLocationsType: lodging_code: { type: string(255) }sfTravelLodgingLocations: name: { type: string(255), notnull: true }address: { type: string(255), notnull: true }city: { type: string(255), notnull: true }distance: { type: integer, notnull: true }phone: { type: string(255), notnull: true }known_2b_sold_out: { type: boolean, notnull: true, default: 0 } relations: I'm assuming this is a misnamed error call ... I have found a few references to that same error in other threads but none that resolve it |
| Comments |
| Comment by Maurice Stephens [ 01/Dec/11 ] |
|
I was able to find a way to override the ATTR_AUTO_ACCESSOR_OVERRIDE with a method in the appConfiguration.class.php file based on this thread ... http://stackoverflow.com/questions/7266293/attr-auto-accessor-override But it is still a difficult error to troubleshoot ... not clear on what the reserved keyword "data" had to do with it ... considering I wasn't even using it in the schema Would be interested in finding some resources that go into detail on the implications of the command line context that symfony relies on |
[DC-982] Options for building models aren't forwarded from CLI to Manager instance Created: 04/Mar/11 Updated: 04/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Maciej Strzelecki | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I.e.: generate_models_options and classPrefix option isn't forwared from CLI configuration to create table task (which uses the Manager's options). |
[DC-1054] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'b.title' in 'field list' Created: 31/Mar/12 Updated: 31/Mar/12 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | suriyakala | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
window vista |
||
| Description |
|
this is the my table creation . CREATE TABLE billboard(id BIGINT AUTO_INCREMENT,title VARCHAR (255),country_id BIGINT,zone_id BIGINT,place VARCHAR(255),occassion VARCHAR(255),itinerary VARCHAR(255),created_at DATETIME NOT NULL,description TEXT NOT NULL,PRIMARY KEY(id)) ENGINE=INNODB; public static function getInstance() { return Doctrine_Core::getTable('Billboard'); }this is the my Doctrine Table // public function getBillboardsForAUser($userId, $limit, $offset=0) $query->orderBy('b.created_at DESC') } plz help me what is the problem. |
| Comments |
| Comment by Benjamin Eberlei [ 31/Mar/12 ] |
|
Doctrine 1, not 2 ticket. |
[DC-449] Duplicate entry integrity constraint error when updating Searchable record with indexed fields from a template Created: 25/Jan/10 Updated: 25/Jan/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jack Sleight | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have the following: <?php class JS_Page extends Doctrine_Record { public function setTableDefinition() { $this->setTableName('page'); $this->hasColumns(array( 'id' => array( 'type' => 'integer', 'length' => 4, 'primary' => true, 'autoincrement' => true, ), 'content' => array( 'type' => 'array', 'length' => 65536, 'notnull' => true, 'default' => array(), ), )); } public function setUp() { $this->actAs(new JS_Template_Meta()); $this->actAs('Searchable', array( 'fields' => array('title', 'description', 'keywords'), 'tableName' => 'page_index', )); } } class JS_Template_Meta extends Doctrine_Template { public function setTableDefinition() { $this->hasColumns(array( 'title' => array( 'type' => 'string', 'length' => 255, 'notnull' => true, ), 'description' => array( 'type' => 'string', ), 'keywords' => array( 'type' => 'string', 'length' => 255, ), )); } } When a Page record is updated I get this error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'application-title-0-3' for key 1
If I only index fields from Page it works. I tracked this down to the code in Doctrine_Search that deletes the existing indexed data before re-indexing a record (I'm not using batchUpdate). For reasons I don't understand the DELETE query is not executing correctly before re-indexing, and so any unchanged data is being added to the index twice, causing the error. I managed to work around this by adding my own template and listener before Searchable, with a preSave event that deletes the index data: ... $this->actAs(new JS_Template_Searchable()); $this->actAs('Searchable', array( 'fields' => array('title', 'description', 'keywords'), 'tableName' => 'page_index', )); ... class JS_Template_Searchable extends Doctrine_Template { public function setTableDefinition() { $this->addListener(new JS_Template_Searchable_Listener()); } } class JS_Template_Searchable_Listener extends Doctrine_Record_Listener { public function preSave(Doctrine_Event $event) { $invoker = $event->getInvoker(); $class = get_class($invoker) . 'Index'; $query = Doctrine_Query::create() ->delete() ->from("{$class} i") ->where("i.id = ?", $invoker['id']) ->execute(); } } Obviously that's an ugly hack, but it works. |
[DC-432] ::isValidType fails when input format is different from php default format Created: 15/Jan/10 Updated: 08/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jón Ragnarsson | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows XP (XAMPP Apache) & Linux |
||
| Attachments: |
|
| Description |
|
In Validator::isValidType(): floatval($var) returns only the integer part if the decimal character is anything other than ".". I've added a small function 'ParseFloat' which takes locale settings into consideration. |
| Comments |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
Can you provide the changes as patch? |
[DC-427] Record Hydration error Created: 14/Jan/10 Updated: 14/Jan/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Diordienko Mykhail | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 9.04 |
||
| Description |
|
schema.yml CheCategory: CheAttribute: CheItemAttribute: CheItemPhoto: fixtures.yml CheAttribute: CheCategory: CheItem: CheItemAttribute: code: $b = Doctrine::getTable("CheAttribute") var_dump($b[0] $tb = Doctrine::getTable("CheAttribute") var_dump($tb[0] in browser i see: string '10' (length=2) string '10' (length=2) but expected: 10 123 With hydration Array & Scalar hydrated data is ok. |
[DC-426] Doctrine incorrectly assigns a NULL value to primary key fields Created: 14/Jan/10 Updated: 14/Jan/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Timo A. Hummel | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, in my project (MySQL 5.x, PHP 5.2.x), I use a combined primary key which looks as follows: $this->hasColumn("guid", "string", 32, array('primary' => true)); My project automatically initializes the GUID and revision fields, but language is left empty. Doctrine assumes that NULL is a good value, and uses the NULL value after saving an object to reload it. This results in the following statement, generated by the find()-Method within Table.php: SELECT b.guid AS b_guid, b.revision AS brevision, b.language AS blanguage, b.active AS bactive, b.title AS btitle, b.content AS bcontent, b.category AS b_category FROM blog_entry b WHERE (b.guid = '505f1a2d13864fa4aef461aa1b5b37a3' AND b.revision = '1' AND b.language = NULL) Since MySQL does not allow NULL values in primary keys, MySQL uses an empty string (''). Doctrine should also use an empty string as default value if the primary key consists of a string, OR issue a warning that MySQL does not allow NULL values in primary keys. The problem with this "bug" is that problems occur in situations where you do not expect them, for example, when storing objects. If a test case is required, just tell me and I'll prepare one. Thanks and best regards, |
[DC-417] Unexpected results with equal many-to-many relations Created: 11/Jan/10 Updated: 14/Jan/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.1.6, 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Ivo Võsa | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.2.10-2ubuntu6.3 with Suhosin-Patch 0.9.7 (cli) (built: Nov 26 2009 14:52:57) |
||
| Description |
|
print_r's before refresh represent what i hoped to get and after that what was inserted into db. INSERT INTO match_reference (match_id, user_id) VALUES (?, ?)
Array
(
[0] => 2
[1] => 1
)
UPDATE match_reference SET match_id = ? WHERE user_id = ? AND match_id = ?
Array
(
[0] => 1
[1] => 1
[2] => 2
)
INSERT INTO match_reference (match_id, user_id) VALUES (?, ?)
Array
(
[0] => 3
[1] => 2
)
INSERT INTO match_reference (match_id, user_id) VALUES (?, ?)
Array
(
[0] => 4
[1] => 2
)
Array
(
[0] => Array
(
[id] => 2
[username] => 2
)
)
Array
(
[0] => Array
(
[id] => 1
[username] => 1
)
[1] => Array
(
[id] => 3
[username] => 3
)
[2] => Array
(
[id] => 4
[username] => 4
)
)
Array
(
)
Array
(
[0] => Array
(
[id] => 3
[username] => 3
)
[1] => Array
(
[id] => 4
[username] => 4
)
)
schema/schema.yml ---
User:
columns:
username: string(255)
relations:
Matches:
class: User
local: user_id
foreign: match_id
refClass: MatchReference
equal: true
cascade: [delete]
MatchReference:
columns:
user_id:
type: integer
primary: true
match_id:
type: integer
primary: true
index.php require_once('config.php');
Doctrine::loadModels('models');
Doctrine_Query::create()
->delete('User')
->execute();
Doctrine_Query::create()
->delete('MatchReference')
->execute();
$u1 = new User();
$u1->id = $u1->username = 1;
$u1->save();
$u2 = new User();
$u2->id = $u2->username = 2;
$u2->save();
$u3 = new User();
$u3->id = $u3->username = 3;
$u3->save();
$u4 = new User();
$u4->id = $u4->username = 4;
$u4->save();
$profiler = new Doctrine_Connection_Profiler();
Doctrine_Manager::getInstance()->getCurrentConnection()->addListener($profiler);
$user_1 = Doctrine::getTable('User')->find(1);
$matches = Doctrine_Query::create()
->from('User')
->whereIn('id', array(2))
->execute(array(), Doctrine::HYDRATE_ARRAY);
$match = $matches[0];
$user_1->link('Matches', array($match['id']));
$user_1->save();
$user_2 = Doctrine::getTable('User')->find(2);
$matches = Doctrine_Query::create()
->from('User')
->whereIn('id', array(3, 4))
->execute(array(), Doctrine::HYDRATE_ARRAY);
foreach ($matches as $match) {
$user_2->link('Matches', array($match['id']));
}
$user_2->save();
foreach ($profiler as $event) {
if (in_array($event->getName(), array('execute')) && preg_match('/^(INSERT|UPDATE)/', $event->getQuery())) {
echo print_r($event->getQuery(), true) . "\n";
echo print_r($event->getParams(), true) . "\n\n";
}
}
print_r($user_1->Matches->toArray());
print_r($user_2->Matches->toArray());
$user_1->refresh(true);
$user_2->refresh(true);
print_r($user_1->Matches->toArray());
print_r($user_2->Matches->toArray());
|
| Comments |
| Comment by Ivo Võsa [ 11/Jan/10 ] |
|
Just tested it on 1.2.1 with same results. |
[DC-401] Doctrine_Query->load crashes with additional ending whitespace in JOIN Created: 06/Jan/10 Updated: 06/Jan/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christian Michel | Assignee: | Guilherme Blanco |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
following will lead to an error: ->leftJoin('alias.RelatedTable alias2 WITH .....') The problem is the additional whitespace behind alias2. $tmp = explode(' ', $path); will create an array of 3 elements where the last one is empty but will be used as empty alias mapping after foreach from line 1698. |
[DC-396] Add timezone support for time and timestamp datatype in PostgreSQL Created: 05/Jan/10 Updated: 19/Aug/12 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Vladislav | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Please add support for the types of time with timezone and timestamp with timezone in the Doctrine when using PostgreSQL. |
| Comments |
| Comment by Alex Potter [ 19/Aug/12 ] |
|
I came across this problem because I prefer to store timezone information instead of local dates. I believe this is resolved by the attached patch, which patches the Timestampable template and it's listener to create and maintain 'timestamp with timezone' in Postgresql. |
[DC-356] Error in self referencing (nest relations) and tableName. Created: 14/Dec/09 Updated: 17/Jan/13 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergio Gomez | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Environment: |
Linux, php 5.2.10, apache 2.2.12 |
||
| Description |
|
I have this schema:
#Link cinterfazdst: { type: integer, primary: true }When I try to get $interfaz->Conexiones, I get this message: Notice: Undefined index: yt_interfaz in /home/sergio/Proyectos/syc/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 288 Notice: Undefined index: in /home/sergio/Proyectos/syc/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 289 Fatal error: Call to a member function getFieldName() on a non-object in /home/sergio/Proyectos/syc/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Hydrator/Graph.php on line 290 But If I remove tableName fields in schema declaration, it works perfectly. The name of tableName don't matters, if you use it, it fails. |
| Comments |
| Comment by Klaas van der Weij [ 15/Feb/11 ] |
|
Same story over here. Same error with the following non-equal nest relation: <?php class TXCRDataNodeCRDataNode extends Doctrine_Record { public function setTableDefinition() { $this->setTableName('x_CRDataNode_CRDataNode'); $this->hasColumn('childNodeID', 'integer', 4, array( 'type' => 'integer', 'length' => 4, 'fixed' => false, 'unsigned' => false, 'primary' => true, 'autoincrement' => false, )); $this->hasColumn('parentNodeID', 'integer', 4, array( 'type' => 'integer', 'length' => 4, 'fixed' => false, 'unsigned' => false, 'primary' => true, 'autoincrement' => false, )); } public function setUp() { parent::setUp(); $this->hasOne('TCRDataNode as child', array( 'local' => 'childNodeID', 'foreign' => 'dataNodeID')); $this->hasOne('TCRDataNode as parent', array( 'local' => 'parentNodeID', 'foreign' => 'dataNodeID')); } } class TCRDataNode extends Doctrine_Record { public function setTableDefinition() { $this->setTableName('CRDataNode'); $this->hasColumn('dataNodeID', 'integer', 4, array( 'type' => 'integer', 'length' => 4, 'fixed' => false, 'unsigned' => false, 'primary' => true, 'autoincrement' => false, )); $this->hasColumn('value', 'string', 255, array( 'type' => 'string', 'length' => 255, 'fixed' => false, 'unsigned' => false, 'primary' => false, 'notnull' => false, 'autoincrement' => false, )); } public function setUp() { $this->hasMany('TCRDataNode as childNodes', array( 'local' => 'parentNodeID', 'foreign' => 'childNodeID', 'refClass' => 'TXCRDataNodeCRDataNode')); $this->hasMany('TCRDataNode as parentNodes', array( 'local' => 'childNodeID', 'foreign' => 'parentNodeID', 'refClass' => 'TXCRDataNodeCRDataNode')); } } $dn = Doctrine_Core::getTable('TCRDataNode')->find(5300); ?> .. and then when I .. <?php $pn = $dn->parentNodes; ?> .. it goes like:
Using Doctrine 1.2.2 It seemed like the same thing as presented in the documentation |
| Comment by Klaas van der Weij [ 17/Feb/11 ] |
|
This aching issue - as I traced the cord back to the wall - appears to originate from the fact that I use UPPERCASES in the names of my databas tables. When I user all lowercases: no problem. Hence it worked on my WAMP server (Windows just lowercases it all). Even when I so much as start the entity-table which an UPPERCASE: bang! Fatal error. This is not logical and, I presume, is a definite bug. Please, oh please fix this .. |
| Comment by Danny Kopping [ 06/Mar/12 ] |
|
As Klaas mentions, this function incorrectly assumes that all databases will be named using lowercase letters. The problem arises in the following line: If one removes the "strtolower" function call, it will work for tables named with uppercase letters, but this is obviously quite an inelegant solution. Could you suggest an alternative solution? I'll be happy to make the change, test it and issue a pull request in GitHub |
| Comment by Danny Kopping [ 06/Mar/12 ] |
|
I've just tested this scenario in as many different possible combinations as I could think of (all tables uppercase/PascalCase, all tables lowercase, some Pascal, some lowercase) and just by removing the "strtolower" function, the issue seems to be resolved. |
| Comment by Jay Klehr [ 17/Jan/13 ] |
|
We've encountered this as well, tried a lot of different things in our models/schema to get around it, but nothing worked. Made a test case here: https://github.com/diablomedia/doctrine1/blob/master/tests/Ticket/DC356TestCase.php Modified the doctrine core as suggested by Danny, but this change causes other Doctrine test to fail (Particularly tests/TableTestCase.php). |
[DC-344] Trouble with auto including generate Base class with specifik name Created: 09/Dec/09 Updated: 21/Mar/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Havelka Ondrej | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | None | ||
| Environment: |
Linux, Ubuntu 9.04 64b |
||
| Description |
|
I have found a problem during testing example model on page http://www.doctrine-project.org/documentation/cookbook/1_1/en/code-igniter-and-doctrine . A use YAML model with object name UserGroup and call method Doctrine_Core::createTablesFromModels('models'); process faling with error: Fatal error: Class 'BaseUserGroup' not found in /sourcepath/models/UserGroup.php on line 13 Generate model file included abstract class BaseUserGroup exist and is OK. If I include BaseUserGroup manuly or rename object "UserGroup" on "UserGroups" everithing work fine. I thing here is a problem with autoloding base class with specifik name. Here is my code example: Doctrine_Core::dropDatabases(); Trouble shotting YAML model is: |
| Comments |
| Comment by Gustavo [ 26/Dec/09 ] |
|
Same problem here following the same example of the 1.2 tutorial. |
| Comment by Michal Olszewski [ 08/Feb/10 ] |
|
Hi, I've stumbled upon the same problem and I think I know where the issue is. So Doctrine_Core::createTablesFromModels() calls Doctrine_Export::exportSchema() which in turn calls Doctrine_Core::loadModels(). Doctrine_Core::loadModels() uses RecursiveIteratorIterator and iterates over all found files. Now I think the order of files returned by RecursiveIteratorIterator is not always the same (depends on OS, filenames and cosmic radiation if (0 !== stripos($className, 'Doctrine_') || class_exists($className, false) || interface_exists($className, false)) as base class is not starting with 'Doctrine_' and is not yet loaded. To fix it properly the algorithm for loading modules must be changed to first include 'modules/generated' classes and then rest of classes. I am not sure but maybe Core::autoload() might be changed to include base classes properly. QUICK WORKAROUND: Doctrine_Core::createTablesFromModels(array('models/generated','models')); as createTablesFromModels() can accept array of directories. Hope this helps you, please let me know if you need any more information. Thanks! |
| Comment by Svetoslav Shterev [ 09/Feb/10 ] |
|
You are missing the model autoloader(http://www.doctrine-project.org/upgrade/1_2#Models%20Autoloading), which was added in 1.2 That should fix the problem with conservative autoloading. |
| Comment by Michal Olszewski [ 09/Feb/10 ] |
|
I've tried registering modelsAutoload() and it works superb in this case for both aggressive and conservative loading. It is a shame that it is not mentioned in 1.2 PDF I've got - it'd make life easier for some people Thanks for your help. |
| Comment by blt [ 21/Mar/10 ] |
|
i am a new user to doctrine and i hit this brick wall. this bug report was all that saved me, and it is a bit misleading. my test results are below. in the end i found a combination that worked, but this seems like a glaring bug especially since the pdf takes the user right down a path that fails completely in all cases (default aggressive loading, doesn't work for me at all). i am using a pear loaded version 1.2 on ubuntu here are my test results: in test.php: --------------------------------------------------------------------------------------------------- in test.php: --------------------------------------------------------------------------------------------------- spl_autoload_register(array('Doctrine_Core', 'modelsAutoload')); in test.php: --------------------------------------------------------------------------------------------------- $manager->setAttribute(Doctrine_Core::ATTR_MODEL_LOADING, Doctrine_Core::MODEL_LOADING_CONSERVATIVE); in test.php: |
[DC-328] Multi-table query (left-join) problem in the Doctrine_Hydrator_Graph class Created: 04/Dec/09 Updated: 04/Dec/09 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Hasan Ozgan | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 9.10 Linux / PHP 5.2.x / Apache2 / Mysql 5 |
||
| Attachments: |
|
| Description |
|
I tried below code. It must be return 2 records, but It returned 1 record. I traced Doctrine and found to reason in I attached my data and code. Is it problem?! 77 $q = Doctrine_Query::create(); |
[DC-293] Implement a self-reference class mechanism without the usage of associative classes Created: 25/Nov/09 Updated: 25/Nov/09 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Rui Miguel Gonçalves | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 9.10, Eclipse |
||
| Description |
|
Equals to summary |
[DC-292] no migrations diff on template change Created: 25/Nov/09 Updated: 01/Mar/10 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0-RC1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christian Jaentsch | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
the generate-migrations-diff does not create migrations if the template changes fields on the model. For example: File: The Fileable Template does the following... (the "fileFields" option stores a couple of fields to add to the model) public function setTableDefinition() foreach ($this->_options['fileFields'] as $key => $field) { $this->hasColumn($field['name'], $field['type'], $field['length'], $field['options']); }} everything works fine on generate-migrations-models (the initial migrations)... but if we change something on the "fileFields" the generate-migrations-diff call doesn't do anything. We have to rebuild all migrations or write a new migration by hand. |
| Comments |
| Comment by Jonathan H. Wage [ 07/Dec/09 ] |
|
I added coverage for this issue and it is working as expected. I compare two schemas: Article:
columns:
title: string(255)
body: clob
and I compare it to this one: Article:
actAs: [Timestampable]
columns:
title: string(255)
body: clob
And now I do this: $migration = new Doctrine_Migration(dirname(__FILE__) . '/DC292/migrations'); $diff = new Doctrine_Migration_Diff(dirname(__FILE__) . '/DC292/from.yml', dirname(__FILE__) . '/DC292/to.yml', $migration); $changes = $diff->generateChanges(); print_r($changes); It has this in the array: [created_columns] => Array
(
[article] => Array
(
[created_at] => Array
(
[notnull] => 1
[type] => timestamp
[length] => 25
)
[updated_at] => Array
(
[notnull] => 1
[type] => timestamp
[length] => 25
)
)
)
|
| Comment by Christian Jaentsch [ 08/Dec/09 ] |
|
The problem does not occur if you compare 2 schemas while one has a certain template and the other not. In my case the problem occurs when the 2 schemas both already have the same template definition but in one case the template itself has changed (e.g. injects one more field into the database table of a certain model via setTableDefinition). |
| Comment by Jonathan H. Wage [ 08/Dec/09 ] |
|
When I test that it works as well. Can you show some kind of reproducible test case? |
| Comment by Jonathan H. Wage [ 01/Mar/10 ] |
|
Maybe you could add a test case for this? |
[DC-278] Invalid qubquery generated if using oracle adapter instead of pdo_oci Created: 23/Nov/09 Updated: 09/Jun/10 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas Wahle | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux, Oracle 10g |
||
| Description |
|
Doctrine generates the following invalid subquery if oracle adapter is used (same query is generated corret if pdo_oci is used): SELECT DISTINCT "s2"."code" The problem is that the order by column is not part of the selected columns. Sample dql statement to reproduce this error: $this->pageAllPager = new Doctrine_Pager( |
| Comments |
| Comment by Jonathan H. Wage [ 23/Nov/09 ] |
|
I believe this is fixed now in the latest Doctrine 1.2. Can you test and confirm? |
| Comment by Thomas Wahle [ 24/Nov/09 ] |
|
It is not fixed with 1.2 RC1 Same sql wich work fine with pdo_oci generates an error using the oracle adapter <p> Failing Query: "SELECT s.code AS s_code, c.code AS ccode, c.name AS cname, c.is_activated AS cis_activated, c.is_deleted AS c_is_deleted FROM spend_category s INNER JOIN company_spend_category c2 ON (s.code = c2.spendcategory_code) INNER JOIN company c ON c.code = c2.company_code WHERE s.code IN (SELECT a.code FROM ( SELECT DISTINCT s2.code FROM spend_category s2 INNER JOIN company_spend_category c4 ON (s2.code = c4.spendcategory_code) INNER JOIN company c3 ON c3.code = c4.company_code WHERE s2.code = '37000000' AND c3.is_deleted IS NOT NULL AND s2.is_deleted IS NOT NULL ORDER BY c3.name desc ) a WHERE ROWNUM <= 10) AND (s.code = '37000000' AND c.is_deleted IS NOT NULL AND s.is_deleted IS NOT NULL) ORDER BY c.name desc"</p> |
| Comment by Jonathan H. Wage [ 24/Nov/09 ] |
|
I can't reproduce the issue in a test case. Can you help me with that? When I test what you're describing I get the results that are expected. |
| Comment by Thomas Wahle [ 25/Nov/09 ] |
|
Hi Jon, if i undestand the last comment correctly this issue will be fixed in 1.2 RC2. I have reviewed lots of existing test cases but did not find an example where pdo_oci or oracle adapter is used. Can you please forward the test case you have created for DC-278 to me? I will use this as a template for any further issues and hopefuly reduce your efforts. Kind regards > Jonathan H. Wage updated DC-278: |
| Comment by Thomas Wahle [ 10/Dec/09 ] |
|
I do believe that I have found the reason and it is still an issue with Doctrine 1.2.1 Doctrine generate the following subquery which is processed in Doctrine_Query:: getLimitSubquery(). SELECT b.id FROM This function replaces the table alias names. It looks like that the first occurance of "a" is detected and the inner alias for table attachment "a" is replaced by "a2" - that's fine. But also the outer table alias "a" is replaced by "a2" The result will be SELECT b.id FROM „a" is selected but the alias has been changed to „a2" and this will cause an sql error. It looks like that this bug will only raise if a table is used in the subquery which starts with an "a" |
| Comment by Thomas Wahle [ 11/Dec/09 ] |
|
As a workaround i have change "a" to "x" in the Doctrine_Connection_Oracle::_createLimitSubquery() As far as no table in our projekt starts with character "x" this works fine for me. By the way: Shouldn't it be $this->quoteIdentifier('a') . '.' instead of just a. ?? original code: modified code: |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
Can you provide the change that fixes the problem for you as a diff so we can test it? |
| Comment by Thomas Wahle [ 09/Jun/10 ] |
|
Hi Jon, long time with no hear from you. Hope you are well! I am sorry, we did not fix this bug really. As writte above we have just implemented a work around by choosing a different character ("x" instead of "a") for the name of the generated sub query alias. This works fine with our data model (no table starts with "x") but may cause the same error with other data models. At all: There was too much trouble in this project last year. Due to this we made the decision to go ahead with pdo_oci to finish the project in time. Kind regards |
| Comment by Jonathan H. Wage [ 09/Jun/10 ] |
|
I'll leave this open if someone runs across the same problem, a test case showing the issue would help with pin pointing the problem area in the code. |
[DC-185] The pessimistic offline locking manager locks the entire table Created: 04/Nov/09 Updated: 13/Dec/12 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.1.4, 1.1.5, 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Fabian Brussa | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 7 |
| Labels: | None | ||
| Environment: |
Windows XP, WampServer Version 2.0 |
||
| Attachments: |
|
| Description |
|
Scenario: Running this code locks the entire table "Steps", and not just the record. in the table "doctrine_lock_tracking", in the fields: "object_type" and "object_key" are saved in this case: "Steps" and "IDStep". |
| Comments |
| Comment by Fabian Brussa [ 18/Nov/09 ] |
|
Is anybody looking into this issue ? |
| Comment by Jonathan H. Wage [ 18/Nov/09 ] |
|
Can you provide a test case that shows the issue? It is hard to look into the issue without a test to run |
| Comment by Fabian Brussa [ 19/Nov/09 ] |
|
ok, I attach the test case |
| Comment by Fabian Brussa [ 03/Dec/09 ] |
|
Have you already been able to look at the testcase ?? |
| Comment by Fabian Brussa [ 14/Jan/10 ] |
|
Any news ?? |
| Comment by Piotr Leszczyński [ 25/Jun/10 ] |
|
This issue is still valid for Doctrine 1.2. Doctrine_Locking_Manager_Pessimistic is UNUSABLE without this bug fixed! |
| Comment by Markus Wößner [ 02/Jul/10 ] |
|
Having a look at "Doctrine_Locking_Manager_Pessimistic::getLock()" it becomes clear what causes this misbehaviour: public function getLock(Doctrine_Record $record, $userIdent) { $objectType = $record->getTable()->getComponentName(); $key = $record->getTable()->getIdentifier(); $gotLock = false; $time = time(); if (is_array($key)) { // Composite key $key = implode('|', $key); } try { $dbh = $this->conn->getDbh(); $this->conn->beginTransaction(); $stmt = $dbh->prepare('INSERT INTO ' . $this->_lockTable . ' (object_type, object_key, user_ident, timestamp_obtained)' . ' VALUES (:object_type, :object_key, :user_ident, :ts_obtained)'); $stmt->bindParam(':object_type', $objectType); $stmt->bindParam(':object_key', $key); $stmt->bindParam(':user_ident', $userIdent); $stmt->bindParam(':ts_obtained', $time); There is NO hint about the Record's identifier VALUE but only about the identifier's NAME (mostly "id") which appears to be redundant information. Instead of ... $key = $record->getTable()->getIdentifier(); ..there should be something like .. $key = $record->get($record->getTable()->getIdentifier()); In case of composite keys a string concatenation, prefixed by identifier's name might work but I would recommend using "md5()" on resulting value to limit its length since field "object_key" is limited to 250 chars. |
| Comment by Florian Zumkeller-Quast [ 02/Jul/10 ] |
|
Based on the previous comment by Markus Wößner i created a patch for row based locking. It concatenates the PK fields and their values to a string and calculates the sha-1 hash as a unique string representing that record. This string is then used as key so that we'll only lock the single Record and not the whole table. I hope you'll give this patch a try - It solved this problem for me. |
| Comment by Markus Wößner [ 02/Jul/10 ] |
|
I applied patch from Mr. Florian Zumkeller-Quast and provided testcase didn't fail anymore. I think this should do it. By the way I find it strange that this issue isn't already fixed. I guess locking is not very much used by Doctrine users. |
| Comment by Jérôme Weber [ 21/Nov/11 ] |
|
I applied patch too and it works now. I guess too that nobody use Lockings but when you use it ... without the patch it fails. |
| Comment by Grégoire Paris [ 13/Dec/12 ] |
|
Duplicate of http://www.doctrine-project.org/jira/browse/DC-984 |
[DC-81] Using WITH in combinations with LIMIT returns unexpected results Created: 06/Oct/09 Updated: 15/Jun/10 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0-ALPHA1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Gerry Vandermaesen | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Mac OS X 10.6.1 |
||
| Description |
|
When I try to limit left joined records with an additional WITH clause, it seems to be bugged when also specifying a LIMIT. My DQL: FROM Transporter t LEFT JOIN t.Profile p LEFT JOIN t.Requests r WITH (r.distributor_id = ?) WHERE t.is_active = ? ORDER BY p.company_country, p.company_name LIMIT 20 This returns me 0 results, while removing the LIMIT (or the WITH) will return me 2 results. |
| Comments |
| Comment by Jonathan H. Wage [ 02/Nov/09 ] |
|
Sorry this is just not enough information to produce the problem. I ran some basic tests looking for what you pointed out but I didn't see any issues. Plus our tests cover this functionality so I imagine that if it were broke we'd get some failures. However, I could be wrong so if you could re-open and provide a failing test case for us that would help with getting it fixed. |
| Comment by Gerry Vandermaesen [ 16/Apr/10 ] |
|
I actually ran into this problem once again in another problem. Schema: Story: Picture: Query: Doctrine_Query::create() Outputted SQL: SELECT "s"."id" AS "s_id", "s"."first_name" AS "sfirst_name", "s"."last_name" AS "slast_name", "s"."country" AS "scountry", "s"."email" AS "semail", "s"."content" AS "scontent", "s"."title" AS "stitle", "s"."summary" AS "ssummary", "s"."is_published" AS "sis_published", "s"."is_rejected" AS "sis_rejected", "s"."is_promoted" AS "sis_promoted", "s"."published_at" AS "spublished_at", "s"."created_at" AS "screated_at", "s"."updated_at" AS "supdated_at", "p"."id" AS "pid", "p"."story_id" AS "pstory_id", "p"."filename_original" AS "pfilename_original", "p"."filename_large" AS "pfilename_large", "p"."filename_thumb" AS "pfilename_thumb", "p"."mime_type" AS "pmime_type", "p"."is_selected" AS "pis_selected", "p"."created_at" AS "pcreated_at", "p"."updated_at" AS "p_updated_at" FROM "story" "s" LEFT JOIN "picture" "p" ON "s"."id" = "p"."story_id" AND ("p"."is_selected" = '1') WHERE "s"."id" IN (SELECT DISTINCT "s2"."id" FROM "story" "s2" LEFT JOIN "picture" "p2" ON "s2"."id" = "p2"."story_id" AND ("p2"."is_selected" = '5') WHERE "s2"."id" = '1' ORDER BY "s2"."published_at" DESC LIMIT 10) AND ("s"."id" = '5') ORDER BY "s"."published_at" DESC Notice the WHERE "s2"."id" = '1' ! |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
Can you provide a test case we can run? |
| Comment by Gerry Vandermaesen [ 15/Jun/10 ] |
|
I could not figure out what test to write but I did narrow the problem down. It seems that the order of the generated SQL clauses does not match the order of the passed parameters, so in the final SQL query the values are mixed up. You can actually see that happening in the SQL query above. I also noticed there a special cases hardcoded in the code for MySQL and PgSQL as far as these "limit subqueries" go, so that might be another reason why you havent bumped into problem before. I was using an SQLite driver. I suppose something goes wrong in the SQL generation, but I don't know the core good enough to find out where exactly it does go wrong, so I'm afraid I can't attach a test case, but it should be easy to reproduce now anyway. |
[DC-661] Subquery Doctrine Couldn't find class Created: 04/May/10 Updated: 08/Jun/10 |
|
| Status: | Reopened |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Mauro E. | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I'm trying to create a query like this one : SELECT nombre, (select count( * ) from alojamiento a left join localidad l on a.localidad_id=l.id where p.id=l.provincia_id and a.activo=true) as total from provincia p $q = Doctrine_Query::create() but it fails : error 500, couldn't find class a. And : leads to : SQLSTATE[42S22]: Column not found: 1054 Unknown column 'a.localidad_id' in 'on clause'. |
| Comments |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
You are using table names in your query and not model names. For future reference, the Jira is for reporting bugs/issues. You can ask user questions on the Doctrine mailing lists: http://www.doctrine-project.org/community |
| Comment by Mauro E. [ 08/Jun/10 ] |
|
My model names are: alojamiento, localidad and provincia I don't use table names. |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
Can you provide a test case because I am not able to reproduce any problems. All of our subquery tests are passing currently and I can't seem to find any problems like you describe. |
| Comment by Mauro E. [ 08/Jun/10 ] |
|
Hope it is not my stupid fault, I apologize if it's my fault. My schema.yml is: Alojamiento: Localidad: Provincia: |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
You can read about how to create unit tests here http://www.doctrine-project.org/projects/orm/1.2/docs/manual/unit-testing/en#unit-testing |
[DC-643] Doctrine_Collection problem duplicate record Created: 22/Apr/10 Updated: 22/Apr/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Thomas Tourlourat - Armetiz | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
The previous code can be execute a lot of time. Now, let us create the Doctrine_Collection.
Doctrine create a relation between the video and tag. It doesn't update it. |
[DC-609] Symfony doctrine doesnt save an M:M table if one of the tables is in a 1:1 relationship with another table Created: 30/Mar/10 Updated: 31/Mar/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris F | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MAC, Symfony PHP framework |
||
| Attachments: |
|
| Description |
|
Symfony doctrine doesnt save an M:M table if one of the tables is in a 1:1 relationship with another table. Refer to Screen.png for ER diagram. I have included the schema files as attachments. You will notice in Screen shot 2010-03-31 at 3.30.56 AM.png, an item is selected in "Amenities list". When the form is submitted, everything saves in the db except for the item in the "Amenities list" (Screen shot 2010-03-31 at 3.31.37 AM.png) |
| Comments |
| Comment by Chris F [ 31/Mar/10 ] |
|
The problem could be because i am embedding a form that has a M:M relation with another table. Which is a similar issue to http://trac.symfony-project.org/ticket/5867 Many have mentioned to override the saveEmbeddedForms() function inside BaseFormDoctrine. The patch at: http://trac.symfony-project.org/ticket/5867 doesnt work. How can we fix this? |
[DC-585] Hydrate Array does not return full array, when Hydrate Scalar does Created: 18/Mar/10 Updated: 02/Mar/12 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | James Solomon | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | None | ||
| Environment: |
OS : Ubuntu 9.04 |
||
| Attachments: |
|
| Description |
|
Description : Upon hydrating as array I will receive one row returned. If I am to hydrate as Scalar, I will get 200+ rows. Also, if i echo the sql ($q->getSqlQuery()) and run that raw, it will also return around 200+ rows. $q = Doctrine_Query::create() //here we will get only the first row //Here we will get all 200+ rows I have yet to dig to deep into this, but if it is indeed a bug, my guess is it is in Doctrine_Hydrator_Graph::hydrateResultSet() I can provide more data if needed. |
| Comments |
| Comment by James Solomon [ 18/Mar/10 ] |
|
I have found this in the google group, and he provides more detailed info, and appears to be the same exact issue : http://groups.google.com/group/doctrine-user/msg/8e4a8a673428fff0 |
| Comment by James Solomon [ 18/Mar/10 ] |
|
seems to be another similar issue here : http://www.doctrine-project.org/jira/browse/DC-328 |
| Comment by Juan Antonio Galán [ 19/May/10 ] |
|
I'm having that problem and I taked a look into the code, found this: I have a query that looks like this: The sql query without aliases in SELECT or without join is built that way: The sql query with aliases in SELECT is built that way: In Doctrine_Hydrator_Graph::_gatherRowData, line 288 there's the following call: $fieldName = $table->getFieldName($last); I'm not understanding the whole hydration process but replacing $fieldName = $table->getFieldName($last); with: if(isset($this->_queryComponents[ $cache[$key]['dqlAlias']]['agg'])) { solves the problem almost in my case. Hope it will help to solve the issue. |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
It seems the suggested change causes many failures in our test suite. Can you give it a try and confirm? |
| Comment by Ben Davies [ 28/Jul/10 ] |
|
Just commenting to say that I can confirm this bug exists. It's happening for me too. |
| Comment by Juan Antonio Galán [ 28/Aug/10 ] |
|
As the error is located in Doctrine_Hydrator_Graph, HYDRATE_RECORD has the same behaviour. I'm trying to find a solution. |
| Comment by Ben Davies [ 31/Aug/10 ] |
|
This only occurs if your alias your identifier field. |
| Comment by Enrico Stahn [ 15/Oct/10 ] |
|
Hi everybody, we really need a unit test here. The provided patch breaks all aliased queries in our application. I will provide a patch and it hopefully solves your problem Juan. If not, please provide more information or add another test-method to the provided unit test. I had to rewrite some of the unit tests cause the order of the fields in the generated sql statement has changed due the provided patch. Enrico http://github.com/doctrine/doctrine1/commit/e3ae69c2260dae6dfbceb4e24138b2379f3da2e6#commitcomment-169495 |
| Comment by Pierrot Evrard [ 04/Mar/11 ] |
|
Hi, I have a little issue with this bug report... I'm currently using Doctrine 1.2 at revision 7691, and I've encounter a bug when select the primary key of a model with a custom alias (typically $query->addSelect( 'r.id as my_id' )), the issue was that Doctrine automatically add `r`.```id``` AS `r_1` to the select clause, in addition to the correct `r`.`id` AS `r_1` part. So, I've browse the code to finally found where does this strange thing comes from, and I've found it on Doctrine_Query::parseSelect() method, just at the line 663:
So I'm wonder : where does this patch is related to this bug report? Whatever, the bug I've encounter is very simple : the regular expression that extract the field name takes care about ' but not ´. You will find a patch for the bug DC-585-b in a few minutes... This patch just make the regular expression taking account of ' and ´ and also remove all useless parentheses in expression (by this way PCRE get less matches to capture and we can earn some precious microseconds). Also, this patch should be completed because the query still have two `r`.`id` AS `r_1` parts, that may cause some other issues with some databases... IMPORTANT NOTE: The previous revision 7674 of Doctrine_Query does not cause the bug encounter with the few lines of code above, just because they were not there. They really must be review. Loops |
| Comment by Pierrot Evrard [ 28/Apr/11 ] |
|
Damn, the bug above was corrected during a few weeks and comes back with the new branch of Doctrine 1.2.14. Does anybody can re-apply the corrective patch (renamed DC-585-c), please ? I repeat it agin, but these few lines of code really need to be review. Loops |
| Comment by klemen nagode [ 13/Jan/12 ] |
|
I also have this problem .. Anyone know howt o fix it? $query->execute(array(), Doctrine::HYDRATE_ARRAY); // returns one row only $query->execute(array(), Doctrine::HYDRATE_SCALAR); // returns result as expected |
| Comment by klemen nagode [ 14/Jan/12 ] |
|
I found solution for my problem: Table had ID field but it was not primary key. When I deleted this column, doctrine started to work as expected. |
| Comment by Lacton [ 02/Mar/12 ] |
|
I have run into the same issue. Using the default hydration, I get only one record. Using "$query->execute(array(), Doctrine::HYDRATE_SCALAR);", I get all the expected records. |
[DC-519] ->where() add parentheses Created: 23/Feb/10 Updated: 23/Feb/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Alessandro Gaspari | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have this method public function getOpenBalances() { $q = $this->createQuery('a') ->select('a.*') ->where('a.invoice_id IN ( SELECT ac.invoice_id FROM AccountingCustomers ac GROUP BY ac.invoice_id HAVING (SUM(ac.dedit) - SUM(ac.credit)) > 0)'); return $q->execute(); }and yhis is the error generated in symfony: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near ")" at character 456. Failing Query: "SELECT a.id AS a_id, a.customer_id AS acustomer_id, a.invoice_id AS ainvoice_id, a.credit AS acredit, a.duedate AS aduedate, a.debit AS adebit, a.paymentdate AS apaymentdate, a.note AS anote, a.created_at AS acreated_at, a.updated_at AS aupdated_at FROM accounting_customers a WHERE (a.invoice_id IN (SELECT a2.invoice_id AS a2_invoice_id FROM accounting_customers a2 GROUP BY a2.invoice_id HAVING (SUM(ac.dedit) - SUM(a2.credi))) > 0))" At the end ther is a parentheses that the code haven't. ))) > 0)) and another problem is that SUM(ac.credit) is changed in SUM(a2.credi) |
[DC-496] Doctrine should warn when a columns / table name match a reserved word Created: 12/Feb/10 Updated: 12/Feb/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Brice Maron | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux / ALL |
||
| Description |
|
Today i looked for quite a long time why doctrine doesn't acte like i wish... it turns out that it was because of a column named 'system_id'... doctrine use this for internal use. no pbm with that, but please notify users that they will experience pbm when a column or table name match X or Y or Z. i've experienced pbm with : table_name, system_id, and some other id too. |
[DC-838] "Primary columns are implied to be notnull in Doctrine" but are not Created: 24/Aug/10 Updated: 24/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jonathan Melnick (Doghouse Media) | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Latest doctrine git commit: bfa24eb68640c412ff6115103ba044bbe1b4333b |
||
| Description |
|
Doctrine says : "Primary columns are implied to be notnull in Doctrine" (line 563 in lib/Doctrine/Import/Builder.php) But when generating (My)SQL statements, primary fields are not set to "NOT NULL" even if it is specified in the YAML and/or Model file. If doctrine unsets the 'notnull' option on line 565 in lib/Doctrine/Import/Builder.php (as it does), it should make sure to add the "NOT NULL" to the SQL when appropriate :
Solution #1: In both places, check if field is primary, and if so, add "NOT NULL" to SQL, since "Primary columns are implied to be notnull in Doctrine". Solution #2: Change Doctrine as to not enforce this behaviour (eg. remove the check in lib/Doctrine/Import/Builder.php on line 565) Thx for this great ORM. ~ Jonathan |
[DC-842] Alias linking wrong Created: 26/Aug/10 Updated: 26/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Sjaakmans | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When you create this kind of query: You get the folowing error: There is no relation between those 2 tables. You can solve it by creating a default SQL query. But my guess is that this shouldn't be the right way. |
[DC-837] Add support for AFTER in migration addColumn function Created: 23/Aug/10 Updated: 23/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Exien | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
It's imperative that the migration utility support specifying where the column is created and not just created at the end of the table, otherwise the migration utility is pretty much useless. I want to keep my database schema clean and tidy. I would say the default use case of this method is to specify where the new column is created. Please add the ability to specify where the new column goes to this function: |
| Comments |
| Comment by Jonathan H. Wage [ 23/Aug/10 ] |
|
I understand your desire to want to control where a column is added but to use words like "imperative" and "useless" is crazy! Where the column goes is in no way a blocker or major problem. If someone wants this bad enough and provides a patch we can consider including it. |
[DC-817] Nested aggregate fields do not hydrate to the right object Created: 12/Aug/10 Updated: 12/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Patrick Nagurny | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I'm trying to run a query that gets a forum, its threads and the number of replies for each thread. The following query works as per the documentation: $threads = Doctrine_Query::create() As expected, I can access $threads[0]['num_replies'] and I get the COUNT() of the number of children for the thread. However, when I run this query: $forum = Doctrine_Query::create() Instead of num_replies being assigned to each Posts[] object, it is only being assigned once to the Forum object, rendering it totally useless. |
[DC-907] when I delete fields from a table in oracle 10g and I execute build schema keeps bringing me those same fields that no longer exist. Created: 28/Jul/10 Updated: 31/Oct/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | fernando guerrero | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I have a table in oracle that i was using but I had to change it so i remove some fields and add others when i run the task buils schema it generates the file schema.yml it created the new fields added but continued to bringing those field who had been eliminated and no longer existed in the database, it generates an error because the file schema.yml are those field but the database does not ... |
| Comments |
| Comment by Benjamin Eberlei [ 15/Sep/10 ] |
|
Is this a Doctrine 1 or 2 bug? Is this a caching issue maybe? |
[DC-790] Doctrine_Inflector::unaccent() Problem with array keys for Norwegian characters Created: 16/Jul/10 Updated: 16/Jul/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | bat | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
In symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Inflector.php, on line 221, there are missing keys (or values) for values 'Ã¥' and 'aa' in $chars. l221 |
[DC-782] Generated SQL for indexes is faulty Created: 11/Jul/10 Updated: 11/Jul/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christian Schmitz | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
LAMP, PHP 5.2.6, PostgreSQL 8.3 |
||
| Description |
|
We have the following YAML: Yaml User:
columns:
id:
type: integer
unsigned: 1
primary: true
autoincrement: true
username:
type: string(255)
notnull: true
indexes:
username_index:
fields:
username:
type: unique
The resulting record-class looks like this, which is still fine: Class class User extends Doctrine_Record { public function setTableDefinition() { $this->setTableName('users'); $this->hasColumn('id', 'integer', null, array( 'type' => 'integer', 'unsigned' => 1, 'primary' => true, 'autoincrement' => true, )); $this->hasColumn('username', 'string', 255, array( 'type' => 'string', 'notnull' => true, 'length' => '255', )); $this->index('username_index', array( 'fields' => array( 'username' => array( 'type' => 'unique', ), ), )); } public function setUp() { parent::setUp(); } } But the resulting SQL looks like this, which is faulty because of the Array stuff at the index: SQL CREATE TABLE "users" ("id" BIGSERIAL, "username" VARCHAR(255) NOT NULL, PRIMARY KEY("id")); CREATE INDEX "username_index" ON "users" ("Array"); |
[DC-769] Variable type different for return value from Doctrine_Record->toArray() depending on whether the object is from a select, or a save. Created: 27/Jun/10 Updated: 24/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | 1.2.1, 1.2.2, 1.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dennis Gearon | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu9.10, PHP 5.2.6, Symfony 1.4.1, Postgres8.4 |
||
| Description |
|
With a object that is created via a save(), and the record's primary key is a INT fed by a SEQUENCE, the type of the variable is an INT. With an object that is hydrated from the database via a SELECT, the record's primary key INT will come back in 'toArray()' as a STRING. That means that checking for type has to know what context it came from, user, INSERT, or SELECT. Not fun. This also screws up converting arrays to JSON, 'cause the STRINGS get quotation marks and the INTS do not. As a general rule, everything FROM the database seems to be strings. Yes, I know, everything 'on the wire' or 'through a socket' comes out as text. And it's a lot faster to leave it that way. But having the type be different depending on the database operation? Not sure I like that. |
| Comments |
| Comment by Jonathan H. Wage [ 24/Aug/10 ] |
|
Can you provide a test case so that we can see if we can come up with a patch? |
[DC-765] Incorrect query for inherited many-to-many relation Created: 24/Jun/10 Updated: 24/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jorgo Miridis | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP Version 5.3.0 |
||
| Description |
|
Column Aggregation Inheritance, Many to Many Inspired by post on symfonyexperts.com (http://symfonyexperts.com/question/show/id/48) I tried to setup a similar scenario whith 1 'Entity' Model and many-to-many relations between them. It seems that Doctrine is omitting the type of the key field in the generated queries. Model (YAML) relations: Compatibles: { class: Entity, local: src_entity_id, foreign: dst_entity_id, refClass: EntityRelationCompatible }EntityRelation: dst_entity_id: { type: integer(4), primary: true }type: { type: string(10) }EntityRelationOwner: EntityRelationCompatible: Action: SQL: To my understanding, the inner SQL statement is missing the type restriction and should be: SELECT dst_entity_id FROM entity_relation WHERE src_entity_id = '1' AND type = 'owner' |
[DC-761] MSSQL Server: No support for transaction savepoints Created: 24/Jun/10 Updated: 24/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Craig Marvelley | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows XP |
||
| Attachments: |
|
| Description |
|
Doctrine_Transaction_MSSQL doesn't provide methods for working with transaction savepoints. I've attached a patch to address this. N.B. As far as I can see, SQL Server doesn't support the release of savepoints, so I've just stubbed that method out. |
[DC-756] Cannot use named parameters in a 'limit(':max') clause Created: 21/Jun/10 Updated: 07/Sep/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Dennis Gearon | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
ubuntu, apache, symfony version 1.4.4 |
||
| Attachments: |
|
| Description |
|
$modulus=5; This works This does not, it gets the whole table |
| Comments |
| Comment by Dennis Gearon [ 24/Jun/10 ] |
|
I noticed an error in the code, which does not solve the problem, only confuse whomever works on it $maxDaysDetailsToProcess=3; as the fourth line in the code. |
| Comment by Juan Antonio Galán [ 07/Sep/10 ] |
|
I think I found a solution but it's making some tests fail. Let me explain you what I did: First I removed any casting to int of the limit value, in order to keep the named parameter in the LIMIT part of the query. Actually this named parameters were converted to 0 due to those int castings. Then I realized that the params are bound as strings so the resulting query looks like ... LIMIT "2" or whatever you put in the limit value, and mysql throws and error. Then I tryed to modify the function that binds the paramters to bind them as integers when they're not strings. Everything seems to work fine and you could put named parameters in the limit clause, but some tests are failing. If you look at the tests that are failing you'll see that they're failing because of a wrong phone number, the test it's expecting a number large number like 6155139185 but the result array has a number like 1860171889. I'm wondering if there's something wrong when binding numbers bigger than mysql INT as integers. I attach a diff file with the changes I did, hope it helps |
[DC-748] Warning: implode(): Invalid arguments passed in /Doctrine/Table.php on line on line 922 Created: 17/Jun/10 Updated: 17/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Victor Paladiychuk | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
mysql 5.1.40, php 5.3.1 |
||
| Attachments: |
|
| Description |
|
Calling to function implode() while not checked if second argument is an array. class Doctrine_Table extends Doctrine_Configurable implements Countable public function unique($fields, $options = array(), $createdUniqueIndex = true) $this->_uniques[] = array($fields, $options); |
[DC-723] String = 512 becomes TEXT Created: 08/Jun/10 Updated: 09/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Karma Dordrak (Drak) | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I don't know if this is a feature or a bug, but if I define a field type = string, length = 512, Doctrine creates this as a TEXT field in MySQL. Seems to do this for a length over 255 characters, e.g. 256. This seems like overkill possibly. Feels like the field should be defined either as TINYTEXT or VARCHAR (which can go up to 63335 characters in length). Is there any way to control this behavior? |
| Comments |
| Comment by Jonathan H. Wage [ 09/Jun/10 ] |
|
No, it is not possible right now. The portable Doctrine types and lengths are converted to certain types for the different databases. In Doctrine2 you can specify the SQL that will create your column in the mapping if you desire something more customize or database specific |
[DC-722] String(512) is being implemented as TEXT instead varchar(512) on MySQL Created: 08/Jun/10 Updated: 08/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Mateo Tibaquirá | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
LAMP over Ubuntu 10.04 |
||
| Description |
|
Well Just now I realized the TEXT type for fields that I've defined in the code as String(512). Thanks in advice. |
[DC-970] Diff Tool doesn't generate the down() method if a field attribute is changed in YAML Created: 11/Nov/10 Updated: 07/Apr/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | taha bayrak | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Doctrine 1.2 |
||
| Description |
|
Diff Tool doesn't generate the down() method if a field attribute is changed in YAML. Below is an example scheme.yaml email:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: false
autoincrement: false
scheme2.yaml email:
type: string(160)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
And below is the generated migration class (down() method is missing): 1239898949_Version39.php class Version39 extends Doctrine_Migration_Base { public function up() { $this->changeColumn('support_tickets', 'email', 'string', '160', array( 'fixed' => '0', 'unsigned' => '', 'primary' => '', 'notnull' => '', 'autoincrement' => '', )); } public function down() { } } |
| Comments |
| Comment by Ton Sharp [ 07/Apr/11 ] |
|
How I can see "changeColumn" doesn't work in the "down" section |
[DC-905] Fields with foreign key shouldn't require definition Created: 29/Oct/10 Updated: 31/Oct/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Alaattin Kahramanlar | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Sample schema attached. Now, keeping attached schema in mind. We have core tables that lots of other tables refer via foreign keys to them, like user, company, etc. We need to explicitly define foreign keys (like user_id) "definitely same as" User.id on each table. By design, this seems unnecessary, and has load on refactoring processes, ie. type change on User.id. Doctrine is already parsing foreign relations from schema, It can use parent table field definition (User.id) in refering table fields (user_id) and on the schema user_id can be defined as: user_id: ~ |
[DC-900] HYDRATE_SINGLE_SCALAR option always returns false Created: 23/Oct/10 Updated: 23/Oct/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Junaid Ebrahim | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu Linux Karmic, Apache 2, Symfony 1.4.3 |
||
| Description |
|
I notice that the fetchone with HYDRATE_SINGLE_SCALAR option always returns false as the return to the $collection object is a string type, this is returned by the hydrateResultSet with driver mode set to 6 (I assume this is for scalar values) My code is a two table query with which returns a string of "10" (g.id in query below) and returns false because it is not a doctrine collection, I did check the doctrine examples and it seems to be the way its used. Not sure if its the doctrine version issue with symfony, my code or an actual bug $q = Doctrine_Core::getTable('ClipGroup') I am using doctrine included in symfony 1.4.3, here is the comment on the Query.php file * @version $Revision: 6792 $, if (count($collection) === 0) { return false; }if ($collection instanceof Doctrine_Collection) { return $collection->getFirst(); }else if (is_array($collection)) { return array_shift($collection); } return false; Hydrator.php - returns a string * @version $Revision: 3192 $ public function hydrateResultSet($stmt, $tableAliases) { $driver = $this->getHydratorDriver($this->_hydrationMode, $tableAliases); $result = $driver->hydrateResultSet($stmt); return $result; } |
[DC-901] Several test cases using CRLF endings Created: 24/Oct/10 Updated: 24/Oct/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Damian Bushong | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 7 x86_64, PHP 5.3 |
||
| Description |
|
Hi there. I'm finding several test cases that are using CRLF line endings, instead of the standard UNIX LF line endings as it seems the rest of the codebase uses. The test case files are as follows: tests/Ticket/2158TestCase.php I'd appreciate it if someone would run a fromdos on these files and commit them. |
[DC-883] Help for Test CLI does not list available test groups Created: 10/Oct/10 Updated: 10/Oct/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | 1.2.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrew Coulton | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The CLI Test Runner is supposed to print a list of available test groups when used with the --help parameter, but this fails as the Doctrine_Test::run() method erroneously expects php sort() to return an array rather than a boolean. Fixed by http://github.com/acoulton/doctrine1/tree/DC-883 |
[DC-1017] Floats persisted in the database are retrieve as strings. Created: 12/Jul/11 Updated: 12/Jul/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Grégoire Paris | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 64 bits, php 5.3 |
||
| Description |
|
Someone complained about symfony padding 0's after floats http://stackoverflow.com/questions/6650786/remove-extra-decimal-place-in-float-datatype-on-symfony/6663829 , I think it's a doctrine problem, since the doctrine:dql task seems to have the same problem: >> doctrine executing dql query Here, pixel ratio is defined as a float in the schema.yml file |
[DC-976] Invalid long constraint name Created: 19/Feb/11 Updated: 19/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Sébastien Rannou | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OS: Linux |
||
| Attachments: |
|
| Description |
|
When the constraint's name is too long, a shorter one is generated using information such as the name of the database. If the database's name begins with a numeric value, the constraint name also begins with a numeric value which results in an invalid constraint name. |
[DC-959] DSN style problems in documentation 1.2 Created: 25/Jan/11 Updated: 25/Jan/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.3 |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Minor |
| Reporter: | Luis Felipe | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
MAMP |
||
| Description |
|
This page: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/introduction-to-connections/en states the DSN can either be provided as an associative array or as a string, but it's not true, specially if you're doing lazy connection, because this type of connection only accepts doctrine dsn style and it doesn't seem to know how to handle unix socket type connections (is it correct?). I would suggest the manual clarify that lazy connection will only accept string type dsn and also will not accept socket connections. Related links: |
[DC-947] getRandom() method for Doctrine_Table Created: 08/Dec/10 Updated: 08/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | ddead profile | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Consider adding this method into Doctrine_Table public static function getRandom() It is portable and very useful. |
[DC-945] Doctrine_Query::create()->where('table.field =') unexpectedly returns a result Created: 06/Dec/10 Updated: 07/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Huijbers | Assignee: | Roman S. Borschel |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.0 |
||
| Description |
|
While firing the following query with Doctrine, I did not expect Doctrine to return me a record, however, even though there is a syntax error (in my opinion) it gave me the first record of the table. $q = \Doctrine_Query::create() $r = $q->fetchOne(); Note that the question mark in the where method is ommitted. This will return a User model with an Id of 1. I would expect this to generate an invalid SQL statement (or even fail to pass the DQL validation). Giving the first record doesn't seem to be appropriate in my opinion. |
[DC-1059] Generate Entity From Database Created: 27/Sep/12 Updated: 27/Sep/12 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Draeli | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Problem already report here : https://github.com/symfony/symfony/issues/5617#issuecomment-8934524 |
[DC-990] Values not escaped Created: 26/Mar/11 Updated: 26/Mar/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Nick Bartlett | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
windows and linux OS, mysql database |
||
| Description |
|
When I save inputs from a form, special characters such as single quotes are inserted into the mysql database without being escaped. It's my understanding that doctrine uses PDO and PDO should handle this escaping automatically, but it is not. Is there a configuration setting that I can set with doctrine to enable this? Thanks |
[DC-422] Using the ON_DEMAND hydrator a warning a thrown on the last iterator of a foreach Created: 13/Jan/10 Updated: 05/Dec/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Arnaud Limbourg | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
os x 10.6, php 5.3.1 |
||
| Attachments: |
|
| Description |
|
Used in a symfony project code similar to the following throws a warning on the last iteration of the foreach $currentQuery = Doctrine_Query::create() $result = $currentQuery->execute(array(), Doctrine_Core::HYDRATE_ON_DEMAND); foreach ($result as $article) { echo $article->getId(); }The warnings are located in the connection profiler. symfony-1.4/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php on line 196 Warning: join(): Invalid arguments passed in symfony-1.4/lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineConnectionProfiler.class.php on line 141 I'm unsure how best to fix it. As far as I can tell there is an issue regarding the call to the iterator rewind at the end of the foreach. Doctrine_Connection_Statement->execute(???) symfony-1.4/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Collection/OnDemand.php:71 |
| Comments |
| Comment by Jonathan H. Wage [ 01/Mar/10 ] |
|
Sorry, we're gonna need some more information to be able to do anything for this ticket. |
| Comment by Jonathan H. Wage [ 08/Jun/10 ] |
|
Is this issue a symfony one and not a Doctrine problem? It is hard to tell. |
| Comment by Marek Snopkowski [ 05/Dec/10 ] |
|
Hi, It's partially both - symfony doesn't protect itself from NULL params (default value), however when use Doctrine_Core::PORTABILITY_EMPTY_TO_NULL then Doctrine will also generate the same warning. Btw - symfony does throw this issue only when logging is enabled. This is a trace tail when when using OnDemand hydrator with foreach. 21 1.1271 26883400 LessonTable->copyTeacherData( ) ../actions.class.php:54 Suggested patch attached. |
[DC-969] When I add a text field to a mysql table the migration code generated fails Created: 07/May/10 Updated: 23/Feb/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Mauro Chojrin | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux, Symfony 1.4, Doctrine 1.2 |
||
| Description |
|
I am using a database designed using schema.yml with a MySql Server. When I add a field of type text the generated code for the migrations (using diff) is as follows: $this->addColumn('<tableName>', '<fieldName>, 'text', '', array( Which produces a MySQL error like this: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1. Failing Query: "ALTER TABLE <tableName> ADD <fieldName> text()" The solution I found was to manipulate manually the generated class to use an addColumn like this: $this->addColumn('<tableName>', '<fieldName>, 'text', null, array( Which would generate an SQL statement like this: ALTER TABLE <tableName> ADD <fieldName> text Which works fine with MySQL, don't know about other RDBMS |
| Comments |
| Comment by Siegfried DuDragon [ 23/Feb/11 ] |
|
My understanding is that you need to put a size to the text so it will choose between tinytext, text, mediumtext, bigtext, so instead of |
[DC-805] Test fails randomly (race condition?) Created: 31/Jul/10 Updated: 31/Jul/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Federico Gimenez Nieto | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian Lenny 5.0 |
||
| Description |
|
Hi, During one of my test builds, one of the test cases failed, probably because of a race condition: Doctrine_Ticket_1441_TestCase : method testTest failed on line 60 Thanks, |
[DC-772] Different test results in different debian boxes Created: 30/Jun/10 Updated: 01/Aug/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Federico Gimenez Nieto | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Debian Lenny 5.0 |
||
| Description |
|
Hi, I have two different debian boxes, in one of them all test pass but in the other (a very basic system with just the essential packages installed) i get: Doctrine_Search_TestCase........................................................failed Unexpected Doctrine_Record_UnknownPropertyException thrown in [Doctrine_Search_TestCase] with message [Unknown record property / related component "SearchTestIndex" on "SearchTest"] in /home/fgimenez/doctrine/Doctrine-1.2.2/lib/Doctrine/Record/Filter/Standard.php on line 55 #0 /home/fgimenez/doctrine/Doctrine-1.2.2/lib/Doctrine/Record.php(1382): Doctrine_Record_Filter_Standard->filterGet(Object(SearchTest), 'SearchTestIndex') I've been trying to determine which is the package that is installed in one box but not in the other and that make the Doctrine_Search_TestCase test pass, no luck so far (same php and sqlite configuration in both environments). Any hint on this is highly appreciated, cheers Federico |
| Comments |
| Comment by Federico Gimenez Nieto [ 01/Aug/10 ] |
|
Hi, In other words, what are the minimum requirements to run doctrine successfully, including the tests? After uploading the debian package of doctrine to the archive there have been some errors regarding the tests on a clean environment with just the packages php5-cli and php5-sqlite (and its dependencies) installed, see [1]. This used to work on other boxes. [1] http://people.debian.org/~lucas/logs/2010/07/31/doctrine_1.2.2-1_lsid64.buildlog Thanks, |
[DC-734] With loading "conservative" or "PEAR", Doctrine_Core::loadModels returns different results for identical calls Created: 14/Jun/10 Updated: 15/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Guilliam X | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Mac OS X 10.5, MAMP 1.9, PHP 5.2.13 |
||
| Attachments: |
|
| Description |
|
Hello, Edit: sorry |
| Comments |
| Comment by Guilliam X [ 15/Jun/10 ] |
|
Actually I have some interrogations about the way how loadModels() works...
So, with our "Foo + BaseFoo" example, the first call to loadModels('models') returns an array with both 'Foo' and 'BaseFoo'. Now if you instantiate class Foo, thanks to modelsAutoload() both classes Foo and BaseFoo will then exist. Then, a 2nd call to loadModels('models') will return an array with only 'Foo' because BaseFoo did not pass at l. 691. So loadModels() is not deterministic...
IMHO:
Edit: oh my... I just found this in documentation:
However I still think that loadModels() should return the same array for 2 same (subsequent) calls... Regards |
| Comment by Guilliam X [ 15/Jun/10 ] |
|
Attached a suggestion of patch that gives loadModels [different but] deterministic behaviors for both aggressive and non-aggressive loadings:
|
[DC-729] Doctrine_Parser_Xml numeric key in array Created: 12/Jun/10 Updated: 12/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vitaliy Mayorov | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I convert array with numeric keys to xml and recived error message
array
in doctrine/Doctrine/Parser/Xml.php on line 74
$key = preg_replace('/[^a-z]/i', '', $key); from 69 line conver numeric key into empty string |
[DC-915] The PHP code is invalid in the "Create Table" example; there are missing commas in the array definition. Created: 02/Nov/10 Updated: 07/Sep/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Matt Alexander | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
The PHP code is invalid in the "Create Table" example; there are missing commas in the array definition. |
| Comments |
| Comment by John Kary [ 07/Sep/11 ] |
|
Submitted pull request with fixes: |
[DC-1019] **REMOVED SPAM** Created: 14/Jul/11 Updated: 23/Aug/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Documentation | Priority: | Trivial |
| Reporter: | betty akamissnigger | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
*REMOVED SPAM* |
||
| Description |
|
*REMOVED SPAM* |
| Comments |
| Comment by Christian Roy [ 23/Aug/11 ] |
|
This issue was filled with spam text so I removed it. |
[DC-1042] submitted form accidentally - PLEASE DELETE Created: 30/Nov/11 Updated: 30/Nov/11 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial |
| Reporter: | Maurice Stephens | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This was accidentally submitted before being complete ... This one can be deleted ... sorry |
| Comments |
| Comment by Maurice Stephens [ 30/Nov/11 ] |
|
This was accidentally submitted before being complete ... This one can be deleted ... sorry |
[DC-804] Files' date set to epoch Created: 31/Jul/10 Updated: 31/Jul/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Trivial |
| Reporter: | Federico Gimenez Nieto | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hi, The date for all the files in the 1.2.2 tarball is set to 1970-01-01. Thanks, |
[DC-731] [Source code format] Transform indent tabs into 4 spaces, and trim trailing spaces Created: 12/Jun/10 Updated: 16/Jun/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | None |
| Affects Version/s: | 1.2.2 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial |
| Reporter: | Guilliam X | Assignee: | Jonathan H. Wage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Doctrine SVN 1.2 revision 7676 |
||
| Attachments: |
|
| Description |
|
I have read that Doctrine source code is wanted not to use tabs for indentation / alignement; G.X |
| Comments |
| Comment by Guilliam X [ 15/Jun/10 ] |
|
Edited the patch with "branches/1.2" as root (I won't provide a test case but they all run without failure after patching) |
| Comment by Guilliam X [ 16/Jun/10 ] |
|
Converted patch to Unix-like EOL style |