Skip to content
Permalink
Browse files

[WIP] Fix SQLServer

This adds some debugging statements for appveyor

Avoiding duplicate external associations after fixes done
in nested contains

Adding a oauth token in appvoyor for faster downloads.
Reverting debugging changes

Trying again to get the oauth token right

Removing the token, it did not work

More debugging to fix sql server
  • Loading branch information...
lorenzo committed Dec 20, 2015
1 parent a026b0c commit 15983de3a0290d3b4e4e6da55a2046351a5d327f
Showing with 7 additions and 3 deletions.
  1. +1 −1 appveyor.yml
  2. +1 −0 src/Database/Driver/Sqlserver.php
  3. +5 −2 src/ORM/EagerLoader.php
@@ -80,4 +80,4 @@ before_test:
test_script:
- sqlcmd -S ".\SQL2012SP1" -U sa -P Password12! -Q "create database cakephp;"
- cd C:\projects\cakephp
- vendor\bin\phpunit.bat
- vendor\bin\phpunit.bat --filter testCountWithComplexOrderBy tests/TestCase/ORM/QueryRegressionTest.php
@@ -109,6 +109,7 @@ public function prepare($query)
$options = [];
}
$statement = $this->_connection->prepare($isObject ? $query->sql() : $query, $options);
debug($statement->queryString);
return new SqlserverStatement($statement, $this);
}
@@ -136,7 +136,8 @@ public function contain($associations = [])
$associations = (array)$associations;
$associations = $this->_reformatContain($associations, $this->_containments);
$this->_normalized = $this->_loadExternal = null;
$this->_normalized = null;
$this->_loadExternal = [];
$this->_aliasList = [];
return $this->_containments = $associations;
}
@@ -152,7 +153,8 @@ public function contain($associations = [])
public function clearContain()
{
$this->_containments = [];
$this->_normalized = $this->_loadExternal = null;
$this->_normalized = null;
$this->_loadExternal = [];
$this->_aliasList = [];
}
@@ -366,6 +368,7 @@ public function attachableAssociations(Table $repository)
$contain = $this->normalized($repository);
$matching = $this->_matching ? $this->_matching->normalized($repository) : [];
$this->_fixStrategies();
$this->_loadExternal = [];
return $this->_resolveJoins($contain, $matching);
}

0 comments on commit 15983de

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