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
f44cad9c
Commit
f44cad9c
authored
May 15, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
a430d22c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
Query.php
draft/new-core/Query.php
+16
-14
Select.php
lib/Doctrine/Query/Select.php
+4
-1
No files found.
draft/new-core/Query.php
View file @
f44cad9c
...
...
@@ -340,12 +340,11 @@ class Doctrine_Query2 extends Doctrine_Hydrate2 implements Countable
{
$tableAlias
=
$this
->
getTableAlias
(
$componentAlias
);
if
(
!
isset
(
$this
->
tables
[
$tableAlias
]))
{
throw
new
Doctrine_Query_Exception
(
'Unknown component path '
.
$componentAlias
);
}
$root
=
current
(
$this
->
tables
);
$table
=
$this
->
tables
[
$tableAlias
];
reset
(
$this
->
_aliasMap
);
$map
=
current
(
$this
->
tables
);
$root
=
$map
[
'table'
];
$table
=
$this
->
_aliasMap
[
$componentAlias
][
'table'
];
$aggregates
=
array
();
if
(
isset
(
$this
->
pendingAggregates
[
$componentAlias
]))
{
...
...
@@ -369,8 +368,8 @@ class Doctrine_Query2 extends Doctrine_Hydrate2 implements Countable
if
(
is_numeric
(
$arg
))
{
$arglist
[]
=
$arg
;
}
elseif
(
count
(
$e
)
>
1
)
{
//$tableAlias = $this->getTableAlias($e[0])
;
$table
=
$this
->
tables
[
$tableAlias
];
$map
=
$this
->
_aliasMap
[
$e
[
0
]]
;
$table
=
$map
[
'table'
];
$e
[
1
]
=
$table
->
getColumnName
(
$e
[
1
]);
...
...
@@ -896,7 +895,10 @@ class Doctrine_Query2 extends Doctrine_Hydrate2 implements Countable
$restoreState
=
false
;
// load fields if necessary
if
(
$loadFields
&&
empty
(
$this
->
pendingFields
))
{
if
(
$loadFields
&&
empty
(
$this
->
pendingFields
)
&&
empty
(
$this
->
pendingAggregates
)
&&
empty
(
$this
->
pendingSubqueries
))
{
$this
->
pendingFields
[
$componentAlias
]
=
array
(
'*'
);
$restoreState
=
true
;
...
...
@@ -906,14 +908,14 @@ class Doctrine_Query2 extends Doctrine_Hydrate2 implements Countable
$this
->
processPendingFields
(
$componentAlias
);
}
if
(
$restoreState
)
{
$this
->
pendingFields
=
array
();
}
if
(
isset
(
$this
->
pendingAggregates
[
$componentAlias
])
||
isset
(
$this
->
pendingAggregates
[
0
]))
{
$this
->
processPendingAggregates
(
$componentAlias
);
}
if
(
$restoreState
)
{
$this
->
pendingFields
=
array
();
$this
->
pendingAggregates
=
array
();
}
}
}
}
...
...
lib/Doctrine/Query/Select.php
View file @
f44cad9c
...
...
@@ -34,8 +34,11 @@ class Doctrine_Query_Select extends Doctrine_Query_Part
{
public
function
parse
(
$dql
)
{
if
(
$dql
===
''
||
$dql
===
null
)
{
throw
new
Doctrine_Query_Exception
(
'Empty select part given.'
);
}
$this
->
query
->
parseSelect
(
$dql
);
return
$this
->
query
;
return
$this
->
query
;
}
}
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