From cac04a0ac0df1a11c7070c832412684f71ab07d1 Mon Sep 17 00:00:00 2001 From: zYne Date: Tue, 24 Oct 2006 17:24:58 +0000 Subject: [PATCH] Fixes #190 --- lib/Doctrine/Hydrate.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index a7b3d772d..4746798cc 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -371,6 +371,13 @@ abstract class Doctrine_Hydrate extends Doctrine_Access { if(empty($row)) continue; + foreach($this->tables as $k => $t) { + if ( ! strcasecmp($key, $k)) + $key = $k; + } + + if ( !isset($this->tables[$key]) ) + throw new Doctrine_Exception("No table named $key found."); $ids = $this->tables[$key]->getIdentifier(); $name = $key;