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
0b78afa9
Commit
0b78afa9
authored
Dec 30, 2007
by
adamthehutt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Doctrine_Collection objects use Doctrine::ATTR_COLL_KEY for data array keys
parent
716bcedd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Collection.php
lib/Doctrine/Collection.php
+4
-0
Configurable.php
lib/Doctrine/Configurable.php
+2
-2
No files found.
lib/Doctrine/Collection.php
View file @
0b78afa9
...
...
@@ -91,6 +91,10 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
$keyColumn
=
$table
->
getBoundQueryPart
(
'indexBy'
);
}
if
(
$keyColumn
===
null
)
{
$keyColumn
=
$table
->
getAttribute
(
Doctrine
::
ATTR_COLL_KEY
);
}
if
(
$keyColumn
!==
null
)
{
$this
->
keyColumn
=
$keyColumn
;
}
...
...
lib/Doctrine/Configurable.php
View file @
0b78afa9
...
...
@@ -97,8 +97,8 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable
if
(
!
(
$this
instanceof
Doctrine_Table
))
{
throw
new
Doctrine_Exception
(
"This attribute can only be set at table level."
);
}
if
(
$value
!==
null
&&
!
$this
->
has
Column
(
$value
))
{
throw
new
Doctrine_Exception
(
"Couldn't set collection key attribute. No such
column
'
$value
'"
);
if
(
$value
!==
null
&&
!
$this
->
has
Field
(
$value
))
{
throw
new
Doctrine_Exception
(
"Couldn't set collection key attribute. No such
field
'
$value
'"
);
}
break
;
case
Doctrine
::
ATTR_CACHE
:
...
...
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