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
65f0cb8d
Commit
65f0cb8d
authored
Jul 05, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
ec39adcd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
23 deletions
+17
-23
Record.php
lib/Doctrine/Record.php
+1
-4
PgsqlTestCase.php
tests/Export/PgsqlTestCase.php
+13
-16
MssqlTestCase.php
tests/Sequence/MssqlTestCase.php
+3
-3
No files found.
lib/Doctrine/Record.php
View file @
65f0cb8d
...
...
@@ -412,10 +412,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
*/
public
function
hydrate
(
array
$data
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$this
->
_data
[
$k
]
=
$v
;
}
$this
->
_data
=
$this
->
_filter
->
cleanData
(
$this
->
_data
);
$this
->
_data
=
$this
->
_filter
->
cleanData
(
$data
);
$this
->
prepareIdentifiers
(
true
);
}
/**
...
...
tests/Export/PgsqlTestCase.php
View file @
65f0cb8d
...
...
@@ -81,21 +81,18 @@ class Doctrine_Export_Pgsql_TestCase extends Doctrine_UnitTestCase
{
$sql
=
$this
->
export
->
exportSql
(
dirname
(
__FILE__
)
.
DIRECTORY_SEPARATOR
.
'_files'
);
$this
->
assertEqual
(
$sql
,
array
(
0
=>
'CREATE TABLE foo (id BIGSERIAL, name VARCHAR(200) NOT NULL, parent_id BIGINT, local_foo BIGINT, PRIMARY KEY(id))'
,
1
=>
'CREATE TABLE foo_reference (foo1 BIGINT, foo2 BIGINT, PRIMARY KEY(foo1, foo2))'
,
2
=>
'CREATE TABLE foo_bar_record (fooid BIGINT, barid BIGINT, PRIMARY KEY(fooid, barid))'
,
3
=>
'CREATE TABLE bar (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))'
,
4
=>
'CREATE TABLE foo_locally_owned (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))'
,
5
=>
'CREATE TABLE foo_foreignly_owned (id BIGSERIAL, name VARCHAR(200), fooid BIGINT, PRIMARY KEY(id))'
,
6
=>
'CREATE TABLE foo_foreignly_owned_with_pk (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))'
,
7
=>
'ALTER TABLE foo_reference ADD CONSTRAINT FOREIGN KEY (foo1) REFERENCES foo(id) ON DELETE CASCADE'
,
8
=>
'ALTER TABLE foo_reference ADD CONSTRAINT FOREIGN KEY (foo2) REFERENCES foo(id) ON DELETE CASCADE'
,
9
=>
'ALTER TABLE foo ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES foo(id) ON DELETE CASCADE'
,
10
=>
'ALTER TABLE foo_foreignly_owned_with_pk ADD CONSTRAINT FOREIGN KEY (id) REFERENCES foo(id)'
,
11
=>
'ALTER TABLE foo_bar_record ADD CONSTRAINT FOREIGN KEY (fooId) REFERENCES foo(id)'
,
12
=>
'ALTER TABLE foo_bar_record ADD CONSTRAINT FOREIGN KEY (barId) REFERENCES bar(id)'
,
13
=>
'ALTER TABLE foo_bar_record ADD CONSTRAINT FOREIGN KEY (barId) REFERENCES bar(id)'
,
14
=>
'ALTER TABLE foo_bar_record ADD CONSTRAINT FOREIGN KEY (fooId) REFERENCES foo(id)'
,
));
$this
->
assertEqual
(
$sql
,
array
(
0
=>
'CREATE TABLE foo_reference (foo1 BIGINT, foo2 BIGINT, PRIMARY KEY(foo1, foo2))'
,
1
=>
'CREATE TABLE foo_locally_owned (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))'
,
2
=>
'CREATE TABLE foo_foreignly_owned_with_pk (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))'
,
3
=>
'CREATE TABLE foo_foreignly_owned (id BIGSERIAL, name VARCHAR(200), fooid BIGINT, PRIMARY KEY(id))'
,
4
=>
'CREATE TABLE foo_bar_record (fooid BIGINT, barid BIGINT, PRIMARY KEY(fooid, barid))'
,
5
=>
'CREATE TABLE foo (id BIGSERIAL, name VARCHAR(200) NOT NULL, parent_id BIGINT, local_foo BIGINT, PRIMARY KEY(id))'
,
6
=>
'CREATE TABLE bar (id BIGSERIAL, name VARCHAR(200), PRIMARY KEY(id))'
,
7
=>
'ALTER TABLE foo_reference ADD CONSTRAINT FOREIGN KEY (foo1) REFERENCES foo(foo1, foo2) NOT DEFERRABLE INITIALLY IMMEDIATE'
,
8
=>
'ALTER TABLE foo_bar_record ADD CONSTRAINT FOREIGN KEY (fooId) REFERENCES foo(fooid, barid) NOT DEFERRABLE INITIALLY IMMEDIATE'
,
9
=>
'ALTER TABLE foo ADD CONSTRAINT FOREIGN KEY (parent_id) REFERENCES foo(id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'
,
10
=>
'ALTER TABLE foo ADD CONSTRAINT FOREIGN KEY (local_foo) REFERENCES foo_locally_owned(id) ON DELETE RESTRICT NOT DEFERRABLE INITIALLY IMMEDIATE'
,
));
}
}
?>
tests/Sequence/MssqlTestCase.php
View file @
65f0cb8d
...
...
@@ -40,7 +40,7 @@ class Doctrine_Sequence_Mssql_TestCase extends Doctrine_UnitTestCase
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@IDENTITY'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@VERSION'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq O
N INSERT INTO user_seq (id)
DEFAULT VALUES'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq O
FF INSERT INTO user_seq
DEFAULT VALUES'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT COUNT(1) FROM user_seq'
);
}
public
function
testNextIdExecutesSql
()
...
...
@@ -51,7 +51,7 @@ class Doctrine_Sequence_Mssql_TestCase extends Doctrine_UnitTestCase
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@IDENTITY'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT @@VERSION'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq O
N INSERT INTO user_seq (id)
DEFAULT VALUES'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SET IDENTITY_INSERT user_seq O
FF INSERT INTO user_seq
DEFAULT VALUES'
);
$this
->
assertEqual
(
$this
->
adapter
->
pop
(),
'SELECT COUNT(1) FROM user_seq'
);
}
public
function
testLastInsertIdCallsPdoLevelEquivalent
()
...
...
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