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
3048620a
Commit
3048620a
authored
Oct 15, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for buildingsql and generating models.
parent
cfb45de5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
GenerateSql.php
lib/Doctrine/Cli/Task/GenerateSql.php
+6
-1
Builder.php
lib/Doctrine/Import/Builder.php
+4
-4
No files found.
lib/Doctrine/Cli/Task/GenerateSql.php
View file @
3048620a
...
@@ -49,6 +49,11 @@ class Doctrine_Cli_Task_GenerateSql extends Doctrine_Cli_Task
...
@@ -49,6 +49,11 @@ class Doctrine_Cli_Task_GenerateSql extends Doctrine_Cli_Task
throw
new
Doctrine_Cli_Exception
(
'Invalid sql path.'
);
throw
new
Doctrine_Cli_Exception
(
'Invalid sql path.'
);
}
}
file_put_contents
(
$path
,
implode
(
"
\n
"
,
$sql
));
$build
=
''
;
foreach
(
$sql
as
$query
)
{
$build
.=
$query
.
";
\n
"
;
}
file_put_contents
(
$path
,
$build
);
}
}
}
}
\ No newline at end of file
lib/Doctrine/Import/Builder.php
View file @
3048620a
...
@@ -397,12 +397,12 @@ END;
...
@@ -397,12 +397,12 @@ END;
$className
=
$options
[
'className'
];
$className
=
$options
[
'className'
];
$extends
=
isset
(
$options
[
'inheritance'
][
'extends'
])
?
$options
[
'inheritance'
][
'extends'
]
:
'Doctrine_Record'
;
$extends
=
isset
(
$options
[
'inheritance'
][
'extends'
])
?
$options
[
'inheritance'
][
'extends'
]
:
'Doctrine_Record'
;
if
(
isset
(
$options
[
'no_definition'
])
&&
$options
[
'no_definition'
]
===
false
)
{
if
(
!
(
isset
(
$options
[
'no_definition'
])
&&
$options
[
'no_definition'
]
===
true
))
{
$definition
=
null
;
$setUp
=
null
;
}
else
{
$definition
=
$this
->
buildTableDefinition
(
$options
,
$columns
,
$relations
,
$indexes
);
$definition
=
$this
->
buildTableDefinition
(
$options
,
$columns
,
$relations
,
$indexes
);
$setUp
=
$this
->
buildSetUp
(
$options
,
$columns
,
$relations
);
$setUp
=
$this
->
buildSetUp
(
$options
,
$columns
,
$relations
);
}
else
{
$definition
=
null
;
$setUp
=
null
;
}
}
$accessors
=
(
isset
(
$options
[
'generate_accessors'
])
&&
$options
[
'generate_accessors'
]
===
true
)
?
$this
->
buildAccessors
(
$options
,
$columns
)
:
null
;
$accessors
=
(
isset
(
$options
[
'generate_accessors'
])
&&
$options
[
'generate_accessors'
]
===
true
)
?
$this
->
buildAccessors
(
$options
,
$columns
)
:
null
;
...
...
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