For example, you have Table1 and Table2, and they are in M:M relationship, ie. you have a composite TableC which contains only the primary keys from Table1 and Table2 (other wise 1:M and M:1 will take place). When the classes are generated,
Not sure if the class for TableC is useful though.
We've tried this with two of our project, and seems all the relations are generated correctly. Please test against your database model and see if there's anything inappropriate. Look forward to your results.
Sorry Mike I don't think it would work with DBDesigner, since its saved XML file has different schema. However if you wish to try MySQL workbench, which would help you import DBDesigner XML file and then you can save your diagram to mwb file, which should work with our script.
We used to use DBDesigner too, the main reason we jumped to MWB is DBDesigner is out of maintenance for quite a while and still buggy, whereas MWB seems got better community support now, though it's still way off a full featured DB IDE (OSS Edition).
Give a go and let us know if there's any problem with your database model.
Thanks for the update. Let's see if i give MWB another try. Whenever i did, it appeared unusable and too complicated in the end and i switched back to DBDesigner. There's even a fork which seems to have some bugs fixed.
Can you try to unzip your oa.mwb file and see if you would get a single file named document.mwb.xml. If that's not the case, could you please advice your MWB version and the xml file name you get after unzip.
Since .mwb are simply zipped xml file, that code line you quoted simply try to open the xml file within the zipped mwb file, that's where it fails.
We've only tested the script again few recent MWB 5.0 OSS releases, which all having the same xml name within it's .mwb file, that's why we made a quick assumption that the script should always read document.mwb.xml. Maybe that's not the case for your mwb file, could you please confirm. Thanks!
From your post, all I can tell is you had the command as 'mwbModel', which should rather in lowercase as 'mwbmodel'. I believe yii shell is case sensitive.
However when we type in a wrong command, it normally returns a empty line instead of the error you got. So, could you confirm if the lower case command would do the trick, thanks!
We might need to ask Qiang to add something like 'Command not found' prompt in the ShellCommand.php and display of a list of available commands if possible.
Thanks for the feedback. I am not at home at the moment so do not know the versions, but it will be the latest community version available on the mysql website (5.0.29).
I am off to London to watch Brasil X Italy tonight, but as soon as I am back, tomorrow evening, I will give it a try and let you know of the outcome. I thank you in advance for your help.
Cass
Quote
Hi Cass,
What version of MySQL workbench are you using?
Can you try to unzip your oa.mwb file and see if you would get a single file named document.mwb.xml. If that's not the case, could you please advice your MWB version and the xml file name you get after unzip.
Since .mwb are simply zipped xml file, that code line you quoted simply try to open the xml file within the zipped mwb file, that's where it fails.
We've only tested the script again few recent MWB 5.0 OSS releases, which all having the same xml name within it's .mwb file, that's why we made a quick assumption that the script should always read document.mwb.xml. Maybe that's not the case for your mwb file, could you please confirm. Thanks!