[EXTENSION] mwbmodelcommand discussion thread

Quote

It's a great extension. I've used it under linux server and it worked fine for me, but when I am switching to do some code locally on my laptop something is going wrong... After using "mwbmodel model.mwb" command something crashes - nothing appears in console - only popup error "CLI stopped working".

My specs:

Xampp Version 1.7.1 for Windows

Yii framework 1.0.4

Any help please? ;)

Please check the Zip and xml php extensions are enabled.

heh it's not about extensions for sure, I give up.

Quote

finaly, it works !!

i'm still having the same error. it works once but then when i try to regenerate again it gave me the same error , i'm using workbench 5.2.0 beta

Thanks in advance

So I was finally able to get this to work.  Unfortunately, my system can't seem to handle zip:// references, so I had to manually extract the .XML file inside, and change the code to just open that file.

Not too bad!  One issue is that, using the default naming conventions, it keeps generating belongs_to references with the wrong key name.  Each time I use it, I have to go through my code and change things like:

'User'=>array(self::BELONGS_TO,'User','idUser'),

to

'User'=>array(self::BELONGS_TO,'User','User_idUser'),

But overall, very helpful tool.  Thanks!

hey,

great extension! I just fixed it to create labels as well (those appeared in soem Yii 1.0.x) - copied few lines from original Yii model command:

Just an FYI. I upgraded to the Beta version of Workbench 5.2.1 and I get the following error when I run mwbmodel

array_merge(): Argument #2 is not an array

I can email you my xml file, if you'd be interested in looking at it.

somebody can help me?

>> mwbmodel demo1.mwb

Warning: Invalid argument supplied for foreach() in /var/www/yii/framework/cli/commands/shell/mwbModelCommand.php on line 99

I did everything but don’t work

I got the same warning




>> mwbmodel /home/htouch/desktop/tech_doc/MySQL_Workbench_Data/yii_test_blog.mwb


Warning: Invalid argument supplied for foreach() in /opt/lampp/htdocs/yii/framework/cli/commands/shell/mwbModelCommand.php on line 99




I’m in:

MySQL Workbench 5.2.15 Beta

Yii 1.1.0

XAMPP for Linux 1.7.1

Can anyone help?

Any reason why this extension is not in active development? I am newbie here… if i am missing something regarding not using this extension…

thanks in advance

Thank you very much