DataObject: Ignoring key definitions

From: Date: Wed, 19 Nov 2003 22:10:08 +0000
Subject: DataObject: Ignoring key definitions
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9030@lists.php.net to get a copy of this message
Hi there, I got a classic cross-linking table in my database looking like this: - table1_id: part of primary key and also foreign key to table1 - table2_id: part of primary key and also foreign key to table2 In my database.ini, this will write the following entries: [crosstable__keys] table1_id = 1 table2_id = 1 Problem is, when I do an INSERT on this table, table1_id will be treated as an auto_increment primary key and will not be included in the INSERT statement. I tried to solve this in the config file using: ignore_sequence_keys = crosstable Didn't work. Then I tried to go into the crosstable class and redefine the keys() method: function keys() {
    return array();
} No success either. The only thing that helped was uncommenting the key definitions from the config file - but this will of course be overwritten on the next createTables run. I must admit I haven't tried the latest package release yet - is this a known bug or are there other workarounds that I've missed? CU Markus

« previous php.pear.general (#9030) next »