summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-20 10:23:04 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-20 10:23:04 +0100
commitacb40d091fc096674b12ab3c95cabf49a42172c9 (patch)
tree0af3a35a628dc28c15eacfa22f1a1bd86bf9f764 /db
parent1d43634ebd97cf67e2ba27f1880cc59b86b29f96 (diff)
correctly map table column names to properties
Diffstat (limited to 'db')
-rw-r--r--db/entity.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/entity.php b/db/entity.php
index 2c6f4f899..5654e1b80 100644
--- a/db/entity.php
+++ b/db/entity.php
@@ -121,7 +121,8 @@ abstract class Entity {
*/
public function fromRow(array $row){
foreach($row as $key => $value){
- $this->$key = $value;
+ $prop = $this->columnToProperty($key);
+ $this->$prop = $value;
}
}