PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject » Bug #8122

(Patch) Typo in Generator.php leads to wrong sequence key

Details

Request #8122(Patch) Typo in Generator.php leads to wrong sequence key
Submitted2006-07-05 12:28 UTC
Fromromainbehar at yahoo dot com
StatusNo Feedback
PackageDB_DataObject
PHP Version5.1.2
Roadmaps(Not assigned)

Comments

[2006-07-05 12:28 UTC] romainbehar at yahoo dot com

Description:
------------
* @version CVS: $Id: Generator.php,v 1.113 2006/03/03 07:03:25 alan_k Exp $

Generator.php line 1112 :

$obj->_table = $this->table;

should be:

$obj->__table = $this->table;

Currently, when using generator_no_ini = true, the class definition files all use the same sequenceKey() function:

when processing several tables with different primary key names, all of them will have the function from the first processed table:

function sequenceKey() // keyname, use native, native name
{
return array('first_table_id', true, false);
}

All the files will have 'first_table_id' as first value in this array.

This yields strange bugs, such as simple DataObject->update() function not working.

With above patch, sequenceKey() functions are generated properly.