Ticket #537 (defect)

Opened 1 year ago

Last modified 1 year ago

TActiveRecord Pk info ENH

Status: closed (fixed)

Reported by: aztech Assigned to: wei
Priority: normal Milestone: 3.1 Beta
Component: Prado Framework v3 Version: 3.1
Severity: feature Keywords: TActiveRecord
Cc:

Create methods for receiving Pk information and data in TActiveRecord class

/**
 * $param mixed $record array or single value
 *
**/
TActiveRecord::getPkCol($record)
/**
 * Return array of strings for composite Pk or name of Pk as string
 * @return array or single value
 *
**/
TActiveRecord::getPkNames() or TActiveRecord::getPkName()

More info ion this topic http://www.pradosoft.com/forum/index.php/topic,6890.msg31262.html#msg31262

Change History

03/30/2007 01:38:17 AM: Modified by wei

  • status changed from new to closed.
  • resolution set to fixed.

Usage:

$meta = TActiveRecordManager::getInstance()->getMetaData('SqliteUsers');
var_dump($meta->PrimaryKeys);
var_dump($meta->Columns['username']);