Skip to content

Commit

Permalink
Update classes to use new method.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 12, 2013
1 parent a1b3ebb commit ccd54c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/ORM/Query.php
Expand Up @@ -117,7 +117,7 @@ public function addDefaultTypes(Table $table) {
$schema = $table->schema();
$fields = [];
foreach ($schema->columns() as $f) {
$fields[$f] = $fields[$alias . '.' . $f] = $schema->column($f)['type'];
$fields[$f] = $fields[$alias . '.' . $f] = $schema->columnType($f);
}
$this->defaultTypes($this->defaultTypes() + $fields);

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/ORM/ResultSet.php
Expand Up @@ -257,7 +257,7 @@ protected function _castValues($table, $values) {
if (empty($this->types[$alias])) {
$schema = $table->schema();
foreach ($schema->columns() as $col) {
$this->types[$alias][$col] = Type::build($schema->column($col)['type']);
$this->types[$alias][$col] = Type::build($schema->columnType($col));
}
}

Expand Down

0 comments on commit ccd54c9

Please sign in to comment.