DataObjects/Companies.php
authorEdward <edward@roojs.com>
Wed, 22 May 2013 11:52:06 +0000 (19:52 +0800)
committerEdward <edward@roojs.com>
Wed, 22 May 2013 11:52:06 +0000 (19:52 +0800)
DataObjects/Companies.php

index a9f4e36..7e7fb0a 100644 (file)
@@ -321,7 +321,14 @@ class Pman_Core_DataObjects_Companies extends DB_DataObject
     
     function initCompanies($roo, $name, $type)
     {
+        $companies = DB_DataObject::factory('companies');
+        $companies->setFrom(array(
+            'name' => $name,
+            'comptype' => $type
+        ));
         
+        $companies->insert();
+        $companies->onInsert(array(), $roo);
     }
     
 }