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
5d3660f2
Commit
5d3660f2
authored
May 16, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
1b3e9817
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
Filter.php
lib/Doctrine/Record/Filter.php
+12
-31
No files found.
lib/Doctrine/Record/Filter.php
View file @
5d3660f2
...
...
@@ -178,39 +178,20 @@ class Doctrine_Record_Filter
*/
private
function
prepareIdentifiers
(
$exists
=
true
)
{
switch
(
$this
->
_table
->
getIdentifierType
())
{
case
Doctrine_Identifier
::
AUTO_INCREMENT
:
case
Doctrine_Identifier
::
SEQUENCE
:
$name
=
$this
->
_table
->
getIdentifier
();
if
(
$exists
)
{
if
(
isset
(
$this
->
_data
[
$name
])
&&
$this
->
_data
[
$name
]
!==
self
::
$null
)
{
$this
->
_id
[
$name
]
=
$this
->
_data
[
$name
];
}
}
unset
(
$this
->
_data
[
$name
]);
break
;
case
Doctrine_Identifier
::
NORMAL
:
$this
->
_id
=
array
();
$name
=
$this
->
_table
->
getIdentifier
();
if
(
isset
(
$this
->
_data
[
$name
])
&&
$this
->
_data
[
$name
]
!==
self
::
$null
)
{
$id
=
$this
->
_table
->
getIdentifier
();
$this
->
_id
=
array
();
if
(
count
(
$id
)
>
1
)
{
foreach
(
$id
as
$name
)
{
if
(
$this
->
_data
[
$name
]
===
self
::
$null
)
{
$this
->
_id
[
$name
]
=
null
;
}
else
{
$this
->
_id
[
$name
]
=
$this
->
_data
[
$name
];
}
break
;
case
Doctrine_Identifier
::
COMPOSITE
:
$names
=
$this
->
_table
->
getIdentifier
();
foreach
(
$names
as
$name
)
{
if
(
$this
->
_data
[
$name
]
===
self
::
$null
)
{
$this
->
_id
[
$name
]
=
null
;
}
else
{
$this
->
_id
[
$name
]
=
$this
->
_data
[
$name
];
}
}
break
;
}
}
else
{
if
(
isset
(
$this
->
_data
[
$id
])
&&
$this
->
_data
[
$id
]
!==
self
::
$null
)
{
$this
->
_id
[
$id
]
=
$this
->
_data
[
$id
];
}
}
}
/**
...
...
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