Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
5bf16920
Commit
5bf16920
authored
Feb 26, 2010
by
beberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] DDC-370 - Fixed bug with CTI and scalar fields DDC-377 - Fixed failing Oracle test
parent
839603da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
SqlWalker.php
lib/Doctrine/ORM/Query/SqlWalker.php
+7
-1
AdvancedDqlQueryTest.php
tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php
+7
-6
No files found.
lib/Doctrine/ORM/Query/SqlWalker.php
View file @
5bf16920
...
...
@@ -815,8 +815,14 @@ class SqlWalker implements TreeWalker
}
else
{
$resultAlias
=
$selectExpression
->
fieldIdentificationVariable
;
}
if
(
$class
->
isInheritanceTypeJoined
())
{
$tableName
=
$this
->
_em
->
getUnitOfWork
()
->
getEntityPersister
(
$class
->
name
)
->
getOwningTable
(
$fieldName
);
}
else
{
$tableName
=
$class
->
getTableName
();
}
$sqlTableAlias
=
$this
->
getSqlTableAlias
(
$
class
->
getTableName
()
,
$dqlAlias
);
$sqlTableAlias
=
$this
->
getSqlTableAlias
(
$
tableName
,
$dqlAlias
);
$columnName
=
$class
->
getQuotedColumnName
(
$fieldName
,
$this
->
_platform
);
$columnAlias
=
$this
->
getSqlColumnAlias
(
$columnName
);
...
...
tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php
View file @
5bf16920
...
...
@@ -28,7 +28,7 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
{
$dql
=
'SELECT p.department, AVG(p.salary) AS avgSalary '
.
'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '
.
'GROUP BY p.department HAVING SUM(p.salary) > 200000'
;
'GROUP BY p.department HAVING SUM(p.salary) > 200000
ORDER BY p.department
'
;
$result
=
$this
->
_em
->
createQuery
(
$dql
)
->
getScalarResult
();
...
...
@@ -97,22 +97,23 @@ class AdvancedDqlQueryTest extends \Doctrine\Tests\OrmFunctionalTestCase
$this
->
assertEquals
(
'Roman B.'
,
$result
[
0
][
'name'
]);
}
/*
public function testGroupByMultipleFields()
public
function
testGroupByMultipleFields
()
{
$dql
=
'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '
.
'GROUP BY p.department, p.name'
;
$result
=
$this
->
_em
->
createQuery
(
$dql
)
->
getResult
();
}*/
/**
$this
->
assertEquals
(
4
,
count
(
$result
));
}
public
function
testUpdateAs
()
{
$dql
=
'UPDATE Doctrine\Tests\Models\Company\CompanyEmployee AS p SET p.salary = 1'
;
$this
->
_em
->
createQuery
(
$dql
)
->
getResult
();
$this
->
assertTrue
(
count
(
$this
->
_em
->
createQuery
(
'SELECT count(p) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1')->getResult()) > 0);
}
*/
'SELECT count(p
.id
) FROM Doctrine\Tests\Models\Company\CompanyEmployee p WHERE p.salary = 1'
)
->
getResult
())
>
0
);
}
/*public function testDeleteAs()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment