Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
9c359d14
Commit
9c359d14
authored
Oct 11, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed table name regression caused by changed introduced in #4971
parent
5ac1d67a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
CHANGELOG.md
extensions/gii/CHANGELOG.md
+1
-1
Generator.php
extensions/gii/generators/model/Generator.php
+2
-2
No files found.
extensions/gii/CHANGELOG.md
View file @
9c359d14
...
...
@@ -4,7 +4,7 @@ Yii Framework 2 gii extension Change Log
2.
0.0 under development
-----------------------
-
no changes in this release.
-
Bug: Fixed table name regression caused by changed introduced in #4971 (samdark)
2.0.0-rc September 27, 2014
...
...
extensions/gii/generators/model/Generator.php
View file @
9c359d14
...
...
@@ -354,7 +354,7 @@ class Generator extends \yii\gii\Generator
$viaLink
=
$this
->
generateRelationLink
([
$table
->
primaryKey
[
0
]
=>
$fks
[
$table
->
primaryKey
[
0
]][
1
]]);
$relationName
=
$this
->
generateRelationName
(
$relations
,
$className0
,
$db
->
getTableSchema
(
$table0
),
$table
->
primaryKey
[
1
],
true
);
$relations
[
$className0
][
$relationName
]
=
[
"return
\$
this->hasMany(
$className1
::className(),
$link
)->viaTable('
{"
.
$this
->
generateTableName
(
$table
->
name
)
.
"}
',
$viaLink
);"
,
"return
\$
this->hasMany(
$className1
::className(),
$link
)->viaTable('
"
.
$this
->
generateTableName
(
$table
->
name
)
.
"
',
$viaLink
);"
,
$className1
,
true
,
];
...
...
@@ -363,7 +363,7 @@ class Generator extends \yii\gii\Generator
$viaLink
=
$this
->
generateRelationLink
([
$table
->
primaryKey
[
1
]
=>
$fks
[
$table
->
primaryKey
[
1
]][
1
]]);
$relationName
=
$this
->
generateRelationName
(
$relations
,
$className1
,
$db
->
getTableSchema
(
$table1
),
$table
->
primaryKey
[
0
],
true
);
$relations
[
$className1
][
$relationName
]
=
[
"return
\$
this->hasMany(
$className0
::className(),
$link
)->viaTable('
{"
.
$this
->
generateTableName
(
$table
->
name
)
.
"}
',
$viaLink
);"
,
"return
\$
this->hasMany(
$className0
::className(),
$link
)->viaTable('
"
.
$this
->
generateTableName
(
$table
->
name
)
.
"
',
$viaLink
);"
,
$className0
,
true
,
];
...
...
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