Re: DataObjectsFormBuilder - tripleLinks
| From: | Markus Wolff | Date: | Wed, 17 Nov 2004 19:21:46 +0000 |
| Subject: | Re: DataObjectsFormBuilder - tripleLinks | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15606@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
On Wed, 17 Nov 2004 11:42:00 +0100, Alexander Petri <alex.petri@gmx.de> wrote:Another approach (which we use here) is to modify the generator script so that it won't write .ini files anymore. Instead, it generates the appropriate keys(), sequenceKey() and table() methods directly into the classes, returning the proper arrays for the table. Not only does this work with any database name, it also gives you the ability to make more modular applications without having to edit the .ini file or re-run the generator all the time. Also, it doesn't waste good memory for loading the whole database schema even if you're working with only two or three tables. To get rid of the .links.ini as well, simply introduce a links() method in your DataObjects and you're good to go. Same advantages as described above. Regards, Markus<db_name>.links.ini on the production server the db has another name which was not equal to the name on my localhost... i simply renamed them - then it works ;-))This is often a problem. I would suggest symlinking the files. Here's how I do it: I have the ini files in CVS, but in my checked out copy I symlink one to the other (intranet.links.ini linked to intradev.links.ini) so when I change one, the other gets changed. WHen I check them in, it shows up as two files. When I check it out for production, still two files. :-)