Comments (5)
I ask the experts: the loss of performance is really relevant?
I do not think it is relevant, if you want to use this feature, you can do it, if not just skipt it.
Having this functionality as an option in Gii would be helpful?
IMO gii generated code is and can only be a template which needs adjustments, and not only by extending the generated class. There are auto generated relation names which may not match your needs, the rules are just a basic set guessed from which in no case ever match the real rules needed in the app if you take it seriously.
If you adjust a table in the DB you can use the gii preview to display the model code and copy the parts that are relevant over to your editor. You may even use "Compare with Clipboard" in PHPstorm to merge the details. I do not think autogenerated, unadjusted code has a valid use case.
from yii2-gii.
@cebe Do not you think valid leave open discussion to listen other opinions and suggestions from the community?
Okay. Let's start from the assumption that we will not have an unalterable file.
When we have a very altered class, the display of the difference results in a large colorful mess.
It would be good that the Yii2 help us compare with the version "original" before the last change so we can view and copy only what has really changed in the database. What do you think?
from yii2-gii.
we have discussed this many times before (found only #15 but I am sure there were more) and you can even use it this way, not sure what gii must implement for this btw.
as far as I see, the diff view of gii and preview feature already have all you need...
from yii2-gii.
Isn't it doing it already? Gii takes current file contents and compares it with what will be generated so it's exactly "original before last change".
from yii2-gii.
@samdark, what I meant is to show the difference generated ONLY by changing the database, ignoring any changes made by the developer.
As if it were made a snapshot every change in the database and the comparison made with the snapshot, instead of comparing with the "real" file, as modified by the developer.
This snapshot replace the "base file", simulating a never changed file.
from yii2-gii.
Related Issues (20)
- CRUD generator template issue - view/update/delete raises error HOT 2
- grud generator gives error for if we give 'crm' for I18N HOT 1
- need checkAccessCallback HOT 1
- Change in Model Generator className to Class HOT 3
- Gii enhancement idea for model-generator HOT 7
- Enh: Redirect to previous page after update HOT 8
- Generator trim validator causes exception in PHP 8.1.9 HOT 9
- still exist calls to className() in templates
- composer issue to trim validator HOT 1
- update readme links
- update .github folder link
- update docs folder link
- update src folder link
- update root folder link
- The table does not exist: uacademy_persona. Model generator throws an error. HOT 17
- Should gii use bootstrap5 assets since both basic and advanced apps are already using it? HOT 3
- parent::init() should be called in yii\gii\components\ActiveField::init() HOT 4
- gii/model --tableName="*" will generate activeRecord for table that I do not need it,like table `migrations` HOT 1
- update irc link
- update src folder links
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-gii.