summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/TActiveRecordGateway.php
diff options
context:
space:
mode:
authorwei <>2007-01-09 10:42:06 +0000
committerwei <>2007-01-09 10:42:06 +0000
commit03f362a40a8dd39f8c8b4bf816334922b7b264e4 (patch)
tree73efc71e946519d2086520102a6c8a022510463a /framework/Data/ActiveRecord/TActiveRecordGateway.php
parenta59a458f9ae2b178d08854c112f34068b50ea243 (diff)
add TActiveRecord::findAllByPks()
Diffstat (limited to 'framework/Data/ActiveRecord/TActiveRecordGateway.php')
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordGateway.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecordGateway.php b/framework/Data/ActiveRecord/TActiveRecordGateway.php
index 1cb1c79f..7bcd0eb2 100644
--- a/framework/Data/ActiveRecord/TActiveRecordGateway.php
+++ b/framework/Data/ActiveRecord/TActiveRecordGateway.php
@@ -147,6 +147,21 @@ class TActiveRecordGateway extends TComponent
}
/**
+ * Returns records matching the list of given primary keys.
+ * @param TActiveRecord active record instance.
+ * @param array list of primary name value pairs
+ * @return array matching data.
+ */
+ public function findRecordsByPks(TActiveRecord $record, $keys)
+ {
+ $meta = $this->getMetaData($record);
+ $command = $meta->getFindInPksCommand($record->getDbConnection(), $keys);
+ $this->raiseCommandEvent(TActiveRecordStatementType::Select,$command,$record,$keys);
+ return $meta->postQuery($command->query());
+ }
+
+
+ /**
* Returns record data matching the given critera. If $iterator is true, it will
* return multiple rows as TDbDataReader otherwise it returns the <b>first</b> row data.
* @param TActiveRecord active record finder instance.