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
3f3103a1
Commit
3f3103a1
authored
Nov 08, 2007
by
dbrewer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #587: added 'removeRecord()' method to Doctrine_Table, which is
called in Doctrine_Connection_UnitOfWork->delete().
parent
c6e99ade
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
UnitOfWork.php
lib/Doctrine/Connection/UnitOfWork.php
+2
-0
Table.php
lib/Doctrine/Table.php
+20
-0
No files found.
lib/Doctrine/Connection/UnitOfWork.php
View file @
3f3103a1
...
...
@@ -290,6 +290,8 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module
$record
->
getTable
()
->
getRecordListener
()
->
postDelete
(
$event
);
$record
->
postDelete
(
$event
);
$record
->
getTable
()
->
removeRecord
(
$record
);
$this
->
conn
->
commit
();
...
...
lib/Doctrine/Table.php
View file @
3f3103a1
...
...
@@ -1049,6 +1049,26 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
return
true
;
}
/**
* removeRecord
* removes a record from the identity map, returning true if the record
* was found and removed and false if the record wasn't found.
*
* @param Doctrine_Record $record record to be removed
* @return boolean
*/
public
function
removeRecord
(
Doctrine_Record
$record
)
{
$id
=
implode
(
' '
,
$record
->
identifier
());
if
(
isset
(
$this
->
_identityMap
[
$id
]))
{
unset
(
$this
->
_identityMap
[
$id
]);
return
true
;
}
return
false
;
}
/**
* getRecord
* first checks if record exists in identityMap, if not
...
...
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