Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Making all tests in sqlite pass

  • Loading branch information...
commit 5cdd8acdee51431dca17ebf600971817be16e04d 1 parent befb1e3
@lorenzo lorenzo authored
Showing with 2 additions and 10 deletions.
  1. +0 −10 Cake/Database/Schema/SqliteSchema.php
  2. +2 −0  Cake/ORM/Marshaller.php
View
10 Cake/Database/Schema/SqliteSchema.php
@@ -23,13 +23,6 @@
class SqliteSchema extends BaseSchema {
/**
- * Whether or not this connection contains sequences
- *
- * @return boolean
- */
- protected $_hasSequences;
-
-/**
* Convert a column definition to the abstract types.
*
* The returned type will be a type that
@@ -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();
View
2  Cake/ORM/Marshaller.php
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.