DataObjects/Events.php
authorAlan Knowles <alan@roojs.com>
Tue, 15 Jan 2013 06:41:12 +0000 (14:41 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 15 Jan 2013 06:41:12 +0000 (14:41 +0800)
DataObjects/Events.php

index 32b2ba7..91b8f44 100644 (file)
@@ -49,7 +49,12 @@ class Pman_Core_DataObjects_Events extends DB_DataObject
             $this->selectAs($jt, 'person_id_%s', 'join_person_id_id');
         
         } else {
-            $this->whereAdd("person_table  = 'Person' OR person_table = '' OR person_table IS NULL"); // default to  our standard.. - unless otherwise requested..
+            $this->whereAdd("
+                    person_table  = '{$jt->tableName()}'
+                    OR
+                    person_table = ''
+                    OR person_table IS NULL"
+            ); // default to  our standard.. - unless otherwise requested..
         }