Преглед изворни кода

Merge branch '525-tv3-obo_speed_colon' of https://github.com/tripal/tripal into 525-tv3-obo_speed_colon

bradford.condon пре 6 година
родитељ
комит
b08039c4db
1 измењених фајлова са 3 додато и 19 уклоњено
  1. 3 19
      tripal_chado/api/ChadoRecord.inc

+ 3 - 19
tripal_chado/api/ChadoRecord.inc

@@ -135,22 +135,6 @@ class ChadoRecord {
     return $this->schema;
   }
 
-  /**
-   * Creates a clone of this record, but without the record ID.
-   * 
-   * @return ChadoRecord
-   *   Returns a new ChadoRecord but with all of the same values but
-   *   without the record ID.
-   */
-  public function clone() {
-    $clone = new ChadoRecord($this->table_name);
-    $clone_values = $this->values;
-    unset($clone_values[$this->pkey]);
-    $clone->setValues($clone_values);
-    
-    return $clone;
-  }
-  
   /**
    * Performs either an update or insert into the table using the values.
    * 
@@ -373,14 +357,14 @@ class ChadoRecord {
     // Make sure the column is valid.
     if (!in_array($column_name, $this->column_names)) {
       $message = t('ChadoRecord::setValue(). The column named, "!column", does not exist in table: "!table".',
-        ['!column' => $column, '!table' => $this->table_name]);
+        ['!column' => $column_name, '!table' => $this->table_name]);
       throw new Exception($message);
     }
     
     // Make sure that the value is not NULL if this is a required field.
     if (!in_array($column_name, $this->required_cols) and $value == '__NULL__') {
       $message = t('ChadoRecord::setValue(). The column named, "!column", requires a value for the table: "!table".',
-        ['!column' => $rcol, '!table' => $this->table_name]);
+        ['!column' => $column_name, '!table' => $this->table_name]);
       throw new Exception($message);
     }
     
@@ -397,7 +381,7 @@ class ChadoRecord {
     // Make sure the column is valid.
     if (!in_array($column_name, $this->column_names)) {
       $message = t('ChadoRecord::getValue(). The column named, "!column", does not exist in table: "!table".',
-        ['!column' => $column, '!table' => $this->table_name]);
+        ['!column' => $column_name, '!table' => $this->table_name]);
       throw new Exception($message);
     }