DataObjects/Core_notify.php
[Pman.Core] / DataObjects / Core_notify.php
index c89b37b..dfde126 100644 (file)
@@ -42,7 +42,9 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject
     public $trigger_event_id;              // int(11)  
     public $evtype;                         // event type (or method to call)fall
     public $act_start;
-    
+    public $person_table;
+
+
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
     
@@ -53,9 +55,11 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject
             return;
         }
         
-//        $person_table = 
-        $c = DB_DataObject::Factory('Person');
-        $c->get($this->person_id);
+        $person_table = empty($this->person_table) ? 'Person' : $this->person_table;
+        $col = $person_table == "Person" ? 'person_id' : $person_table . '_id';
+            
+        $c = DB_DataObject::Factory($person_table);
+        $c->get($this->{$col});
         return $c;
         
     }