Exemplo n.º 1
0
 public function getTableName(Object_Class $class, $query = false)
 {
     if ($query) {
         return "object_brick_query_" . $this->model->getKey() . "_" . $class->getId();
     } else {
         return "object_brick_store_" . $this->model->getKey() . "_" . $class->getId();
     }
 }
Exemplo n.º 2
0
 /**
  * Update the class name in all object
  *
  * @return void
  */
 public function updateClassNameInObjects($newName)
 {
     $this->db->update("objects", array("o_className" => $newName), $this->db->quoteInto("o_classId = ?", $this->model->getId()));
     // only for logging
     $this->logSql("UPDATE objects SET `o_className` = " . $this->db->quote($newName) . " WHERE o_classId = " . $this->db->quote($this->model->getId()) . ";");
     $this->db->update("object_query_" . $this->model->getId(), array("oo_className" => $newName));
     // only for logging
     $this->logSql("UPDATE object_query_" . $this->model->getId() . " SET `oo_className` = " . $this->db->quote($newName));
 }
Exemplo n.º 3
0
 public function getTableName(Object_Class $class)
 {
     return "object_collection_" . $this->model->getKey() . "_" . $class->getId();
 }
Exemplo n.º 4
0
 /**
  * Update the class name in all object
  *
  * @return void
  */
 public function updateClassNameInObjects($newName)
 {
     $this->db->update("objects", array("o_className" => $newName), $this->db->quoteInto("o_classId = ?", $this->model->getId()));
     $this->db->update("object_query_" . $this->model->getId(), array("oo_className" => $newName));
 }