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
37e6248b
Commit
37e6248b
authored
Aug 14, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
f6c1560e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Record.php
lib/Doctrine/Record.php
+11
-10
No files found.
lib/Doctrine/Record.php
View file @
37e6248b
...
@@ -1441,7 +1441,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
...
@@ -1441,7 +1441,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
* @param array $ids the identifiers of the related records
* @param array $ids the identifiers of the related records
* @return Doctrine_Record this object
* @return Doctrine_Record this object
*/
*/
public
function
removeLinks
(
$alias
,
$ids
)
public
function
unlink
(
$alias
,
$ids
)
{
{
$ids
=
(
array
)
$ids
;
$ids
=
(
array
)
$ids
;
...
@@ -1452,17 +1452,18 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
...
@@ -1452,17 +1452,18 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
if
(
$rel
instanceof
Doctrine_Relation_Association
)
{
if
(
$rel
instanceof
Doctrine_Relation_Association
)
{
$q
->
delete
()
$q
->
delete
()
->
from
(
$rel
->
getAssociationTable
()
->
getComponentName
())
->
from
(
$rel
->
getAssociationTable
()
->
getComponentName
())
->
where
(
$rel
->
getLocal
()
.
' = ?'
,
$this
->
identifier
())
->
where
(
$rel
->
getLocal
()
.
' = ?'
,
array_values
(
$this
->
identifier
()))
->
whereIn
(
$rel
->
getForeign
(),
$ids
)
->
whereIn
(
$rel
->
getForeign
(),
$ids
);
->
execute
();
$q
->
execute
();
if
(
isset
(
$this
->
references
[
$alias
]))
{
foreach
(
$this
->
references
[
$alias
]
as
$k
=>
$record
)
{
if
(
isset
(
$this
->
_references
[
$alias
]))
{
if
(
in_array
(
$record
->
identifier
(),
$ids
))
{
foreach
(
$this
->
_references
[
$alias
]
as
$k
=>
$record
)
{
$this
->
references
[
$alias
]
->
remove
(
$k
);
if
(
in_array
(
current
(
$record
->
identifier
()),
$ids
))
{
$this
->
_references
[
$alias
]
->
remove
(
$k
);
}
}
}
}
$this
->
references
[
$alias
]
->
takeSnapshot
();
$this
->
_
references
[
$alias
]
->
takeSnapshot
();
}
}
}
}
return
$this
;
return
$this
;
...
...
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