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
54fcf19f
Commit
54fcf19f
authored
May 24, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
6b86c9fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
9 deletions
+31
-9
Hydrate.php
lib/Doctrine/Hydrate.php
+28
-5
JoinCondition.php
lib/Doctrine/Query/JoinCondition.php
+1
-1
Set.php
lib/Doctrine/Query/Set.php
+2
-3
No files found.
lib/Doctrine/Hydrate.php
View file @
54fcf19f
...
...
@@ -295,13 +295,20 @@ class Doctrine_Hydrate
return
$this
;
}
public
function
getDeclaration
(
$name
)
/**
* getAliasDeclaration
* get the declaration for given component alias
*
* @param string $componentAlias the component alias the retrieve the declaration from
* @return array the alias declaration
*/
public
function
getAliasDeclaration
(
$componentAlias
)
{
if
(
!
isset
(
$this
->
_aliasMap
[
$
name
]))
{
throw
new
Doctrine_Hydrate_Exception
(
'Unknown component alias '
.
$
name
);
if
(
!
isset
(
$this
->
_aliasMap
[
$
componentAlias
]))
{
throw
new
Doctrine_Hydrate_Exception
(
'Unknown component alias '
.
$
componentAlias
);
}
return
$this
->
_aliasMap
[
$
name
];
return
$this
->
_aliasMap
[
$
componentAlias
];
}
/**
* setQueryPart
...
...
@@ -364,6 +371,7 @@ class Doctrine_Hydrate
}
/**
* limitSubqueryUsed
* whether or not limit subquery was used
*
* @return boolean
*/
...
...
@@ -485,10 +493,25 @@ class Doctrine_Hydrate
{
return
$params
;
}
public
function
setAliasMap
(
$map
)
/**
* setAliasMap
* sets the whole component alias map
*
* @param array $map alias map
* @return Doctrine_Hydrate this object
*/
public
function
setAliasMap
(
array
$map
)
{
$this
->
_aliasMap
=
$map
;
return
$this
;
}
/**
* getAliasMap
* returns the component alias map
*
* @return array component alias map
*/
public
function
getAliasMap
()
{
return
$this
->
_aliasMap
;
...
...
lib/Doctrine/Query/JoinCondition.php
View file @
54fcf19f
...
...
@@ -46,7 +46,7 @@ class Doctrine_Query_JoinCondition extends Doctrine_Query_Condition
$value
=
$e
[
2
];
$alias
=
$this
->
query
->
getTableAlias
(
$reference
);
$map
=
$this
->
query
->
getDeclaration
(
$reference
);
$map
=
$this
->
query
->
get
Alias
Declaration
(
$reference
);
$table
=
$map
[
'table'
];
// check if value is enumerated value
$enumIndex
=
$table
->
enumIndex
(
$field
,
trim
(
$value
,
"'"
));
...
...
lib/Doctrine/Query/Set.php
View file @
54fcf19f
...
...
@@ -45,9 +45,8 @@ class Doctrine_Query_Set extends Doctrine_Query_Part
$reference
=
implode
(
'.'
,
$e
);
$alias
=
$this
->
query
->
getTableAlias
(
$reference
);
$map
=
$this
->
query
->
getDeclaration
(
$reference
);
$alias
=
$this
->
query
->
getTableAlias
(
$reference
);
$map
=
$this
->
query
->
getAliasDeclaration
(
$reference
);
$result
[]
=
$map
[
'table'
]
->
getColumnName
(
$field
)
.
' = '
.
$set
[
1
];
}
...
...
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