Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit dfaaf2d

Browse files
author
Nik Barham
committed
Compatibility with new Hodgepodge 3+ branch
1 parent 37eb0de commit dfaaf2d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"require": {
1616
"php": ">=5.4.0",
17-
"brokencube/hodgepodge": ">=2.2.2.0"
17+
"brokencube/hodgepodge": ">=3.0.0.0"
1818
},
1919
"autoload": {
2020
"psr-0": { "Automatorm": "src" }

src/Automatorm/Orm/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ protected function buildQuery(&$query)
640640
$query->sql("SELECT last_insert_id() into @id");
641641
} else {
642642
$query->update($this->table, $this->data, array('id' => $this->data['id']));
643-
$query->sql("SELECT ".$this->data['id']." into @id");
643+
$query->sql("SELECT ".$this->data['id']." into @id");
644644
}
645645

646646
$origin_id = new SqlString('@id');

src/Automatorm/Orm/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ final public static function factoryData($where, $table, $database, Core\QueryOp
191191
// Select * from $table where $where
192192
$query = new Core\Query($database);
193193
list($data) = $query->select($table, $where, $options)->execute();
194-
194+
195195
return $data;
196196
}
197197

src/Automatorm/Orm/Schema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public static function generate($dbconnection = 'default', $namespace = 'models'
3838
{
3939
Cache::lifetime(60 * 60 * 24 * 7, 'model'); // Cache model weekly
4040

41-
$db = Database::details($dbconnection);
42-
$cache = new Cache('schema_' . md5($dbconnection . $namespace . $db['database'] . static::CURRENT_VERSION), 'model');
41+
$db = Database::get($dbconnection);
42+
$cache = new Cache('schema_' . md5($dbconnection . $namespace . $db->database . static::CURRENT_VERSION), 'model');
4343

4444
$obj = $cache();
4545

0 commit comments

Comments
 (0)