DB_DataObject and Sequence Table format
| From: | Michiel van der Blonk | Date: | Mon, 15 Nov 2004 13:29:11 +0000 |
| Subject: | DB_DataObject and Sequence Table format | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-15512@lists.php.net to get a copy of this message | ||
Hi all,
I am using DB_DataObject on apache with mysql rather succesfully for a while, but I ran into a small problem.
I am using person->insert(). At that point I am faced with the fact that the underlying DB class creates a sequence table with a formatting of
'%s_seq'. I would like to change that format, but I seem to not get it done right.
According to the manual it should read something like:
"
$person = new DataObjects_Person;
$db= $person->getDatabaseConnection();
$db->options['seqname_format'] = 'SQ_%s';
"
When I query the options afterwards, nothing has changed. I am assuming I am changing a copy of the DB object here...
I also tried changing the .ini file which DB_DataObject reads, but I think it only parses the DB_DataObject part.
"[DB]
seqname_format = SQ_%s"
How to solve?
Michiel