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
8e57185e
Commit
8e57185e
authored
Sep 13, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes.
parent
122ebf0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
Schema.php
lib/Doctrine/Export/Schema.php
+7
-2
schema.xml
tests/schema.xml
+4
-4
No files found.
lib/Doctrine/Export/Schema.php
View file @
8e57185e
...
...
@@ -124,8 +124,7 @@ abstract class Doctrine_Export_Schema
// and currently declared classes
foreach
(
$tables
as
$name
)
{
$class
=
new
ReflectionClass
(
$name
);
$conn
=
Doctrine_Manager
::
getInstance
()
->
getConnectionForComponent
(
$name
);
// check if class is an instance of Doctrine_Record and not abstract
// class must have method setTableDefinition (to avoid non-Record subclasses like symfony's sfDoctrineRecord)
// we have to recursively iterate through the class parents just to be sure that the classes using for example
...
...
@@ -154,6 +153,12 @@ abstract class Doctrine_Export_Schema
$table
=
array
();
$table
[
'name'
]
=
$data
[
'tableName'
];
$table
[
'class'
]
=
get_class
(
$record
);
foreach
(
$data
[
'columns'
]
AS
$name
=>
$column
)
{
$data
[
'columns'
][
$name
][
'name'
]
=
$name
;
}
$table
[
'columns'
]
=
$data
[
'columns'
];
$array
[
'tables'
][
$data
[
'tableName'
]]
=
$table
;
...
...
tests/schema.xml
View file @
8e57185e
<?xml version="1.0" encoding="ISO-8859-1" ?>
<schema>
<tables>
<
table
>
<
user
>
<name>
user
</name>
<class>
User
</class>
<columns>
...
...
@@ -18,9 +18,9 @@
<notnull>
true
</notnull>
</column>
</columns>
</
table
>
</
user
>
<
table
>
<
group
>
<name>
group
</name>
<class>
Group
</class>
<columns>
...
...
@@ -37,6 +37,6 @@
<notnull>
true
</notnull>
</column>
</columns>
</
table
>
</
group
>
</tables>
</schema>
\ No newline at end of file
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