yii2-enhanced-gii
yii2-enhanced-gii copied to clipboard
No relations on Model Generation has no effect
Hi, I'm having an issue that I don't know exactly how to overcome... I have a table with some relations, for example: Bank, BankAccount. I'm generating the Model and CRUD using IO, but the CRUD of Bank table is showing BankAccount too, and I don't wanna that.
I need to be only the Bank table on the CRUD forms I already set to ignore relations I already set skipped relations, without success
I’m not sure, but I probably found a bug on enhanced-gii regarding the relations... To give some information, I created a video and changed to gif, to show whant is happening here.
http://imgur.com/CUbNhBM
I think that this would explain what I was asking before regarding don’t want have all tables related on the same form on CRUD.
Could you generate anything on official gii? Could you send any schema? And don't forget to check your db engine too.. to be perfect,it should be built upon innodb engine
Sent from my ZUK Z2131 using FastHub
Is there any hasOne relation between Bank and BankAccount table? I just add that on last commit.
Sent from my ZUK Z2131 using FastHub
I already generated with official gii and I have the expected result: on CRUD for a table with relations, there are only the form for that table, even having the relations on database.
I'm sending the schema attached.
And the database is InnoDB.
Hmm...not happening to me.. have you tried to use *
on table name?
Which mysql version u're using?
Also experiencing the same issue.
Fixed by changing line 191 in /vendor/mootensai/yii2-enhanced-gii/BaseGenerator.php and removing the preceding not.
From:
if (!$this->generateRelations === self::RELATIONS_NONE) { return []; }
To:
if ($this->generateRelations === self::RELATIONS_NONE) { return []; }