Re: [PATCH] DB_DataObject and DB_DataObject_Generator
| From: | Alan Knowles | Date: | Fri, 06 Dec 2002 05:52:46 +0000 |
| Subject: | Re: [PATCH] DB_DataObject and DB_DataObject_Generator | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-11404@lists.php.net to get a copy of this message | ||
Sergey A Lipnevich wrote:
Hi!
Alan: I've installed using pear upgrade DB_DataObject, good stuff so far. I've embedded Generator class in my own script, so I don't know if createTables.php works, but DB_DataObject and Generator are fine. I wish generator could add _database = 'xyz' in addition to __table = 'abc'. Now I'm doing this manually, because in my scenario _database doesn't change.
you could have a look at the hooks stuff in Generator, if you extend generator and add the hooks in you can add extra variables - like _database etc.
Regards
Alan
Stijn: I've looked over your changes to _connect, and it negates the logic I suggested. The logic is, "preserve _database if it's set, otherwise assign it from table_xyz=<database> option, otherwise assign from DSN". You neglect the first step. Thanks a lot! Sergey. Alan Knowles wrote:Have added this now - and released, can you download and check it works ok Thanks Alan