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
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
PSDI Army
yii2
Commits
f37a6fda
Commit
f37a6fda
authored
Jun 10, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs about MongoDB gii generator usage added
parent
5c9c0829
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
CHANGELOG.md
extensions/mongodb/CHANGELOG.md
+1
-0
README.md
extensions/mongodb/README.md
+28
-0
No files found.
extensions/mongodb/CHANGELOG.md
View file @
f37a6fda
...
...
@@ -6,6 +6,7 @@ Yii Framework 2 mongodb extension Change Log
-
Bug #3385: Fixed "The 'connected' property is deprecated" (samdark)
-
Enh #3520: Added
`unlinkAll()`
-method to active record to remove all records of a model relation (NmDimas, samdark, cebe)
-
Enh: Gii generator for Active Record model added (klimov-paul)
2.0.0-beta April 13, 2014
...
...
extensions/mongodb/README.md
View file @
f37a6fda
...
...
@@ -259,3 +259,30 @@ return [
]
];
```
Using Gii generator
-------------------
This extension provides a code generator, which can be integrated with yii 'gii' module. It allows generation of the
Active Record code. In order to enable it, you should adjust your application configuration in following way:
```
php
return
[
//....
'modules'
=>
[
// ...
'gii'
=>
[
'class'
=>
'yii\gii\Module'
,
'generators'
=>
[
'mongoDbModel'
=>
[
'class'
=>
'yii\mongodb\gii\model\Generator'
]
],
],
]
];
```
> Note: since MongoDB is schemaless, there is not much information, which generated code may base on. So generated code
is very basic and definitely requires adjustments.
\ 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