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
f6bb8c97
Commit
f6bb8c97
authored
May 22, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
99037abd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
3 deletions
+16
-3
Collection.php
lib/Doctrine/Collection.php
+10
-0
Connection.php
lib/Doctrine/Connection.php
+1
-1
Record.php
lib/Doctrine/Record.php
+5
-2
No files found.
lib/Doctrine/Collection.php
View file @
f6bb8c97
...
...
@@ -105,6 +105,16 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
{
return
$this
->
_table
;
}
/**
* setData
*
* @param array $data
* @return Doctrine_Collection
*/
public
function
setData
(
array
$data
)
{
$this
->
data
=
$data
;
}
/**
* this method is automatically called when this Doctrine_Collection is serialized
*
...
...
lib/Doctrine/Connection.php
View file @
f6bb8c97
...
...
@@ -696,7 +696,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
}
catch
(
Doctrine_Adapter_Exception
$e
)
{
}
catch
(
PDOException
$e
)
{
}
print
Doctrine_Lib
::
formatSql
(
$query
);
$this
->
rethrowException
(
$e
);
}
/**
...
...
lib/Doctrine/Record.php
View file @
f6bb8c97
...
...
@@ -488,7 +488,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
foreach
(
$array
as
$k
=>
$v
)
{
$this
->
$k
=
$v
;
}
$this
->
_table
->
getRepository
()
->
add
(
$this
);
$this
->
_filter
=
new
Doctrine_Record_Filter
(
$this
);
...
...
@@ -825,7 +825,10 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
if
(
!
(
$value
instanceof
Doctrine_Collection
))
{
throw
new
Doctrine_Record_Exception
(
"Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references."
);
}
$value
->
setReference
(
$this
,
$rel
);
if
(
isset
(
$this
->
_references
[
$name
]))
{
$this
->
_references
[
$name
]
->
setData
(
$value
->
getData
());
return
$this
;
}
}
else
{
// one-to-one relation found
if
(
!
(
$value
instanceof
Doctrine_Record
))
{
...
...
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