public function save() { if ($this->is_new()) { $this->table_id = md5(rand(1,1000000)); } parent::save(); }
$result = $query->execute(isset(static::$_connection) ? static::$_connection : null); $result[1] > 0 and $this->set($vars); // Move the values set into the object, including the PK $this->{static::primary_key()} = $result[0]; // <<-- here, overwrite the PK with "0"
It looks like you're new here. If you want to get involved, click one of these buttons!