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
39e0f2f3
Commit
39e0f2f3
authored
Jul 29, 2012
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'DBAL-298' into 2.3
parents
1e1cdb7e
7a73a5ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
AbstractPlatform.php
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
+1
-1
ForeignKeyConstraint.php
lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php
+19
-0
No files found.
lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
View file @
39e0f2f3
...
@@ -2004,7 +2004,7 @@ abstract class AbstractPlatform
...
@@ -2004,7 +2004,7 @@ abstract class AbstractPlatform
$sql
.=
implode
(
', '
,
$foreignKey
->
getLocalColumns
())
$sql
.=
implode
(
', '
,
$foreignKey
->
getLocalColumns
())
.
') REFERENCES '
.
') REFERENCES '
.
$foreignKey
->
get
ForeignTableName
(
)
.
' ('
.
$foreignKey
->
get
QuotedForeignTableName
(
$this
)
.
' ('
.
implode
(
', '
,
$foreignKey
->
getForeignColumns
())
.
')'
;
.
implode
(
', '
,
$foreignKey
->
getForeignColumns
())
.
')'
;
return
$sql
;
return
$sql
;
...
...
lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php
View file @
39e0f2f3
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
namespace
Doctrine\DBAL\Schema
;
namespace
Doctrine\DBAL\Schema
;
use
Doctrine\DBAL\Schema\Visitor\Visitor
;
use
Doctrine\DBAL\Schema\Visitor\Visitor
;
use
Doctrine\DBAL\Platforms\AbstractPlatform
;
class
ForeignKeyConstraint
extends
AbstractAsset
implements
Constraint
class
ForeignKeyConstraint
extends
AbstractAsset
implements
Constraint
{
{
...
@@ -109,6 +110,24 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint
...
@@ -109,6 +110,24 @@ class ForeignKeyConstraint extends AbstractAsset implements Constraint
return
$this
->
_foreignTableName
;
return
$this
->
_foreignTableName
;
}
}
/**
* Get the quoted representation of this asset but only if it was defined with one. Otherwise
* return the plain unquoted value as inserted.
*
* @param AbstractPlatform $platform
* @return string
*/
public
function
getQuotedForeignTableName
(
AbstractPlatform
$platform
)
{
$keywords
=
$platform
->
getReservedKeywordsList
();
$parts
=
explode
(
"."
,
$this
->
getForeignTableName
());
foreach
(
$parts
AS
$k
=>
$v
)
{
$parts
[
$k
]
=
(
$this
->
_quoted
||
$keywords
->
isKeyword
(
$v
))
?
$platform
->
quoteIdentifier
(
$v
)
:
$v
;
}
return
implode
(
"."
,
$parts
);
}
/**
/**
* @return array
* @return array
*/
*/
...
...
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