diff options
-rw-r--r-- | idiorm.php | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -1058,6 +1058,21 @@ return implode(', ', $db_fields); } } + + /** + * Helper method that filters a column/value array returning only those + * columns that belong to a compound primary key. + * + * If the key contains a column that does not exist in the given array, + * a null value will be returned for it. + */ + protected function _get_compound_id_column_values($value) { + $filtered = array(); + foreach($this->_get_id_column_name() as $key) { + $filtered[$key] = isset($value[$key]) ? $value[$key] : null; + } + return $filtered; + } /** * Add a WHERE column = value clause to your query. Each time |