Re: Issues with cvs DO and MDB2 with generator
| From: | Lukas Smith | Date: | Thu, 23 Jun 2005 11:18:36 +0000 |
| Subject: | Re: Issues with cvs DO and MDB2 with generator | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19738@lists.php.net to get a copy of this message | ||
Dan Rossi wrote:
On 23/06/2005, at 8:02 PM, Lukas Smith wrote:I would leave it as a two step process. MDB2_Schema has means to reverse engineer an xml schema. So let users do that. Once they have the xml schema they can run your generator. As a matter of fact it should be possible to write an optional MDB2_Schema writer class (I would have to add the ability to select a writer). So basically the process is: - load xml schema file with MDB2_Schema - dump xml schema definition using a custom writer class here is the source of the current writer: http://cvs.php.net/co.php/pear/MDB2_Schema/MDB2/Schema/Writer.php its ugly and it should be rewritten using xml_serializer or something. but aside from that it just gets an array structure and dumps it. the main thing missing probably is foreign key support. but that is already being pondered. regards, LukasDan Rossi wrote:Eek, Ok if its useful to others ? I would prob have to also create the schema files when using createTables :\This has come up a few times before and prob needs a fix, can someone advise what to do or should i have a look at the generator section now , I am getting these errors at random times as MDB2 uses the Manager module , what should i do ?? :) Fatal error: Call to undefined function: tableinfo() in /usr/local/lib/php/DB/DataObject/Generator.php on line 775I think its not worth the time to try and fix the generator for MDB2. instead you should probably write one from scratch that uses the MDB2_Schema manager to read an xml schema file. MDB2_Schema also supports reverse engineering xml schema files. regards, Lukas