View Issue Details

IDProjectCategoryView StatusLast Update
49PHPOF2Defaultpublic18 Sep 2008 16:44
Reportermkierat Assigned Totimj  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Target Version0.10.1Fixed in Version0.10.1 
Summary49: Add ability to get() a row from a table using a composite key
DescriptionIt would be good to have to ability to say:
$foo = new foo();
$prikey = $foo->getSerialisedPriKey(array('col1'=>'x', 'col2'=>'y'));
$foo->get($prikey);


DBRow has a function called serialisePriKey() but it can only serialise already expisting primary keys
TagsNo tags attached.

Activities

timj

31 Aug 2008 23:33

manager   ~92

Last edited: 31 Aug 2008 23:36

Fixed in SVN r1199
You just need to call PHPOF2_DBrow::getSerialisedPriKey(), pass it your array of values and then call get().

However even before this fix you could also do this just by doing:

// assume composite primary key of col1, col2
$row = new PHPOF2_DBRow(whatever);
$row->col1 = 'val';
$row->col2 = 'bar';
$row->get();

Issue History

Date Modified Username Field Change
20 May 2008 16:58 guest New Issue
24 Jul 2008 11:09 timj Target Version => 0.11.0
31 Aug 2008 23:33 timj Assigned To => timj
31 Aug 2008 23:33 timj Status new => assigned
31 Aug 2008 23:33 timj Target Version 0.11.0 => 0.10.1
31 Aug 2008 23:33 timj Summary Cannot get() a row from a table using a composite key => Add ability to get() a row from a table using a composite key
31 Aug 2008 23:33 timj Status assigned => resolved
31 Aug 2008 23:33 timj Fixed in Version => 0.10.1
31 Aug 2008 23:33 timj Resolution open => fixed
31 Aug 2008 23:33 timj Note Added: 92
31 Aug 2008 23:36 timj Note Edited: 92
5 Sep 2008 09:59 timj Reporter guest => mkierat
18 Sep 2008 16:44 timj Status resolved => closed