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
8ed0530f
Commit
8ed0530f
authored
Dec 03, 2007
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #626.
parent
28fba54f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Query.php
lib/Doctrine/Query.php
+7
-6
No files found.
lib/Doctrine/Query.php
View file @
8ed0530f
...
...
@@ -1588,7 +1588,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
$queryPart
.=
' ON '
.
$localAlias
.
'.'
.
$localTable
->
get
Identifier
(
)
// what about composite keys?
.
$localTable
->
get
ColumnName
(
$localTable
->
getIdentifier
()
)
// what about composite keys?
.
' = '
.
$assocAlias
.
'.'
.
$relation
->
getLocal
();
...
...
@@ -1611,8 +1611,9 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
if
(
$relation
->
isEqual
())
{
$queryPart
.=
'('
;
}
$queryPart
.=
$this
->
_conn
->
quoteIdentifier
(
$foreignAlias
.
'.'
.
$relation
->
getTable
()
->
getIdentifier
())
$relationTable
=
$relation
->
getTable
();
$queryPart
.=
$this
->
_conn
->
quoteIdentifier
(
$foreignAlias
.
'.'
.
$relationTable
->
getColumnName
(
$relationTable
->
getIdentifier
()))
.
' = '
.
$this
->
_conn
->
quoteIdentifier
(
$assocAlias
.
'.'
.
$relation
->
getForeign
());
...
...
@@ -1622,9 +1623,9 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
.
' = '
.
$this
->
_conn
->
quoteIdentifier
(
$assocAlias
.
'.'
.
$relation
->
getLocal
())
.
') AND '
.
$this
->
_conn
->
quoteIdentifier
(
$foreignAlias
.
'.'
.
$table
->
get
Identifier
(
))
.
$this
->
_conn
->
quoteIdentifier
(
$foreignAlias
.
'.'
.
$table
->
get
ColumnName
(
$table
->
getIdentifier
()
))
.
' != '
.
$this
->
_conn
->
quoteIdentifier
(
$localAlias
.
'.'
.
$table
->
get
Identifier
(
));
.
$this
->
_conn
->
quoteIdentifier
(
$localAlias
.
'.'
.
$table
->
get
ColumnName
(
$table
->
getIdentifier
()
));
}
}
}
else
{
...
...
@@ -1794,7 +1795,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
// build the query base
$q
=
'SELECT COUNT(DISTINCT '
.
$this
->
getTableAlias
(
$componentAlias
)
.
'.'
.
implode
(
','
,
(
array
)
$table
->
getIdentifier
())
.
'.'
.
implode
(
','
,
$table
->
getIdentifierColumnNames
())
.
') AS num_results'
;
foreach
(
$this
->
_sqlParts
[
'select'
]
as
$field
)
{
...
...
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