Skip to content
Permalink
Browse files

Making all tests in sqlite pass

  • Loading branch information...
lorenzo committed Jan 14, 2014
1 parent befb1e3 commit 5cdd8acdee51431dca17ebf600971817be16e04d
Showing with 2 additions and 10 deletions.
  1. +0 −10 Cake/Database/Schema/SqliteSchema.php
  2. +2 −0 Cake/ORM/Marshaller.php
@@ -22,13 +22,6 @@
*/
class SqliteSchema extends BaseSchema {
/**
* Whether or not this connection contains sequences
*
* @return boolean
*/
protected $_hasSequences;
/**
* Convert a column definition to the abstract types.
*
@@ -375,9 +368,6 @@ public function truncateTableSql(Table $table) {
* @return void
*/
public function hasSequences() {
if ($this->_hasSequences !== null) {
return $this->_hasSequences;
}
$result = $this->_driver
->prepare('SELECT 1 FROM sqlite_master WHERE name = "sqlite_sequence"');
$result->execute();
@@ -189,9 +189,11 @@ protected function _belongsToMany(Association $assoc, array $data, $include = []
protected function _loadBelongsToMany($assoc, $ids) {
$target = $assoc->target();
$primaryKey = (array)$target->primaryKey();
if (count($primaryKey) > 1) {
return [];
}
return $assoc->find('all')
->where([$primaryKey[0] . ' IN' => $ids])
->toArray();

0 comments on commit 5cdd8ac

Please sign in to comment.
You can’t perform that action at this time.