diff options
author | Chris Cornutt <chris.cornutt@hp.com> | 2014-12-16 11:01:25 -0600 |
---|---|---|
committer | Chris Cornutt <chris.cornutt@hp.com> | 2014-12-16 11:01:25 -0600 |
commit | fdefcbeb57a8adf81882c67331b4d2a7a9dd80a2 (patch) | |
tree | c809d3a92e97467780da17a32447be02c34448ca /src | |
parent | ebfa2b490a43d73645c9f90b3c09570cc5bb05ef (diff) | |
download | gatekeeper-fdefcbeb57a8adf81882c67331b4d2a7a9dd80a2.zip gatekeeper-fdefcbeb57a8adf81882c67331b4d2a7a9dd80a2.tar.gz gatekeeper-fdefcbeb57a8adf81882c67331b4d2a7a9dd80a2.tar.bz2 |
see if we need to change a column given over from a property name to a MySQL column name
Diffstat (limited to 'src')
-rw-r--r-- | src/Psecio/Gatekeeper/Model/Mysql.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Psecio/Gatekeeper/Model/Mysql.php b/src/Psecio/Gatekeeper/Model/Mysql.php index 7e814bf..8adba4e 100644 --- a/src/Psecio/Gatekeeper/Model/Mysql.php +++ b/src/Psecio/Gatekeeper/Model/Mysql.php @@ -225,9 +225,14 @@ class Mysql extends \Modler\Model */ public function find(array $where = array()) { + $properties = $this->getProperties(); list($columns, $bind) = $this->setup($where); $update = array(); foreach ($bind as $column => $name) { + // See if we keep to transfer it over to a column name + if (array_key_exists($column, $properties)) { + $column = $properties[$column]['column']; + } $update[] = $column.' = '.$name; } |