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
0a5a3bcd
Commit
0a5a3bcd
authored
Jan 07, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aggregate relations now treated the same ways as composite relations on save operations
parent
dd5c9d05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
UnitOfWork.php
lib/Doctrine/Connection/UnitOfWork.php
+14
-15
No files found.
lib/Doctrine/Connection/UnitOfWork.php
View file @
0a5a3bcd
...
...
@@ -144,25 +144,24 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module implemen
$fk
=
$record
->
getTable
()
->
getRelation
(
$k
);
if
(
$fk
instanceof
Doctrine_Relation_ForeignKey
||
$fk
instanceof
Doctrine_Relation_LocalKey
)
{
if
(
$fk
->
isComposite
())
{
$local
=
$fk
->
getLocal
();
$foreign
=
$fk
->
getForeign
();
if
(
$record
->
getTable
()
->
hasPrimaryKey
(
$fk
->
getLocal
()))
{
if
(
!
$record
->
exists
())
{
$saveLater
[
$k
]
=
$fk
;
}
else
{
$v
->
save
();
}
$local
=
$fk
->
getLocal
();
$foreign
=
$fk
->
getForeign
();
if
(
$record
->
getTable
()
->
hasPrimaryKey
(
$fk
->
getLocal
()))
{
if
(
!
$record
->
exists
())
{
$saveLater
[
$k
]
=
$fk
;
}
else
{
// ONE-TO-ONE relationship
$obj
=
$record
->
get
(
$fk
->
getTable
()
->
getComponentName
());
$v
->
save
();
}
}
else
{
// ONE-TO-ONE relationship
$obj
=
$record
->
get
(
$fk
->
getAlias
());
if
(
$obj
->
getState
()
!=
Doctrine_Record
::
STATE_TCLEAN
)
{
$obj
->
save
();
}
if
(
$obj
->
getState
()
!=
Doctrine_Record
::
STATE_TCLEAN
)
{
$obj
->
save
();
}
}
}
elseif
(
$fk
instanceof
Doctrine_Relation_Association
)
{
$v
->
save
();
}
...
...
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