Skip to content

Commit

Permalink
Merge pull request #108 from KumbiaPHP/dev
Browse files Browse the repository at this point in the history
0.5.5
  • Loading branch information
joanhey authored May 31, 2021
2 parents fee3046 + 2cb39b3 commit 03f057c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BaseRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
abstract class BaseRecord
{

public const VERSION = '0.5.4';
public const VERSION = '0.5.5';

/**
* Database por defecto usa default.
Expand Down
6 changes: 3 additions & 3 deletions LiteRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ public function update(array $data = []): bool
if ($this->callback('_beforeUpdate') === \false) {
return \false;
}
//$this->hasPK();

$values = [];
$sql = QueryGenerator::update($this, $values);
//var_dump($values);var_dump($sql);die;

if ( ! self::prepare($sql)->execute($values)) {
return \false;
}
Expand Down Expand Up @@ -152,7 +152,7 @@ public function save(array $data = []): bool
*/
protected function saveMethod(): string
{
return static::hasPK() ? 'create' : 'update';
return $this->hasPK() ? 'update' : 'create';
}

/**
Expand Down

0 comments on commit 03f057c

Please sign in to comment.