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
bf1a5251
Commit
bf1a5251
authored
Sep 02, 2009
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] Fixed issue with file-based metadata drivers and the CLI.
parent
4fa4d7a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
AbstractFileDriver.php
lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php
+3
-3
SchemaToolTask.php
lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php
+5
-3
No files found.
lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php
View file @
bf1a5251
...
...
@@ -180,15 +180,15 @@ abstract class AbstractFileDriver implements Driver
*
* @return array The list of class names that have been preloaded.
*/
public
function
preload
()
public
function
preload
(
$force
=
false
)
{
if
(
$this
->
_mode
!=
self
::
PRELOAD
)
{
if
(
$this
->
_mode
!=
self
::
PRELOAD
&&
!
$force
)
{
return
array
();
}
foreach
((
array
)
$this
->
_paths
as
$path
)
{
if
(
is_dir
(
$path
))
{
$files
=
glob
(
$path
.
'/*'
.
$this
->
_fileExtension
);
$files
=
glob
(
$path
.
'/*'
);
foreach
(
$files
as
$file
)
{
$this
->
_elements
=
array_merge
(
$this
->
_elements
,
$this
->
_loadMappingFile
(
$file
));
}
...
...
lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php
View file @
bf1a5251
...
...
@@ -52,7 +52,7 @@ class SchemaToolTask extends AbstractTask
{
$this
->
getPrinter
()
->
write
(
'schema-tool'
,
'KEYWORD'
);
$this
->
getPrinter
()
->
writeln
(
'
--create | --drop | --update
[--dump-sql] [--classdir=<path>]'
,
'
(--create | --drop | --update)
[--dump-sql] [--classdir=<path>]'
,
'INFO'
);
}
...
...
@@ -126,8 +126,10 @@ class SchemaToolTask extends AbstractTask
}
}
}
else
{
$driver
->
preload
();
$classes
=
$cmf
->
getLoadedMetadata
();
$preloadedClasses
=
$driver
->
preload
(
true
);
foreach
(
$preloadedClasses
as
$className
)
{
$classes
[]
=
$cmf
->
getMetadataFor
(
$className
);
}
}
$printer
=
$this
->
getPrinter
();
...
...
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