Commit Graph

341 Commits

Author SHA1 Message Date
Carsten Brandt
488767914a do not remove records that have no primary key selected
this problem occurs when joining active record but not selecting the
primary key field. records get populated but they do not have primary
key value populated which results in only one record left over in the
result.
2014-03-25 13:35:25 +01:00
Carsten Brandt
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
Qiang Xue
8053082e0c Fixes #2848: Individual queries should be enclosed within parenthesis in a UNION query 2014-03-22 12:45:14 -04:00
Koudy
411dc71b09 Fixed getting the count for queries with the union 2014-03-22 13:48:09 +04:00
Qiang Xue
3c518c4207 Merge commit 'f605508bb2805d24df98037ea239f8f582deda0e' into feature-container 2014-03-20 23:51:02 -04:00
Qiang Xue
7f4c28231b Fixes #2826 2014-03-20 13:30:58 -04:00
Alexander Makarov
af030c5f5b Added $skipIfSet to ActiveRecord::loadDefaultValues 2014-03-20 19:43:59 +04:00
Alexander Makarov
c24ae25be2 Fixed getting default values from schema for SQLite 2014-03-20 13:54:13 +04:00
Alexander Makarov
1ff9dedf60 Fixed getting default value from postgres schema 2014-03-20 13:29:36 +04:00
Alexander Makarov
39b0c454e1 Default values init moved to a method that should be called manually 2014-03-19 23:04:48 +04:00
Alexander Makarov
b66427f8c7 Fixes #2726: ActiveRecord now fills default values on creating new instance of the model if defaults are available from DB schema 2014-03-19 18:06:20 +04:00
Grant Furgiuele
ed2885c31d Changed comment again to actually be correct. This is also consistent with the draft of the definitive guide. 2014-03-18 15:23:59 -05:00
Grant Furgiuele
bc91853e3f Modified example in DataReader usage comment to reference a DB Command function which accepts a SQL string argument. 2014-03-18 15:23:58 -05:00
Qiang Xue
8e11ad0360 refactored code to use Instance::ensure() 2014-03-18 12:31:27 -04:00
Qiang Xue
8c2e39235f Turn module and application into DI containers. 2014-03-17 23:57:01 -04:00
Qiang Xue
b9287abf81 minor fixes. 2014-03-17 09:47:34 -04:00
SonicGD
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
Qiang Xue
5a61ee91be Fixed test break. 2014-03-14 23:06:09 -04:00
Qiang Xue
9ff8b0f903 Fixes #2571: Fixed the bug that batchInsert will fail for SQLite if the values contain null or boolean false;
Fixes #2683: Fixed the bug that batchInsert will fail for MySQL if the values contain boolean false.
2014-03-14 22:48:20 -04:00
Qiang Xue
34cfb356e9 Fixes #2713: using relations defined in behavior may throw exception in lazy loading. 2014-03-12 21:23:29 -04:00
Qiang Xue
aaa4e429a4 Fixes #2687: table alias may not be respected when specified in relation query. 2014-03-11 20:13:03 -04:00
Carsten Brandt
6fff5662df better use @see for See in phpdoc 2014-03-11 05:38:35 +01:00
Qiang Xue
bcf5b4644e Fixes #2687: ActiveQuery::joinWith() has problem when the query is used twice. 2014-03-10 21:44:48 -04:00
Qiang Xue
1af04e1e1b Fixes #2661: Added boolean column type support for SQLite 2014-03-07 22:38:30 -05:00
Carsten Brandt
1b7e1cd027 Merge pull request #2605 branch 'feature' of https://github.com/mongosoft/yii2 into code-style
* 'feature' of https://github.com/mongosoft/yii2:
  returned back formatting language files
  code style. WHILE
  code style. FOR
  code style. FOREACH
  code style. operator IF
  @param, @var, @property and @return must declare types as boolean, integer, string, array or null
  short echo tags
  short array syntax

Conflicts:
	extensions/apidoc/commands/RenderController.php
	extensions/apidoc/models/BaseDoc.php
	extensions/apidoc/models/Context.php
	extensions/apidoc/templates/bootstrap/Renderer.php
	extensions/apidoc/templates/bootstrap/layouts/guide.php
	extensions/apidoc/templates/bootstrap/layouts/main.php
	extensions/apidoc/templates/bootstrap/views/index.php
	extensions/apidoc/templates/html/Renderer.php
	extensions/apidoc/templates/offline/views/index.php
	extensions/apidoc/templates/offline/views/offline.php
	extensions/apidoc/templates/online/views/index.php
	extensions/elasticsearch/Connection.php
	extensions/redis/ActiveQuery.php
	framework/base/ErrorException.php
	framework/helpers/BaseFileHelper.php
	tests/unit/framework/helpers/FileHelperTest.php
2014-03-07 21:54:44 +01:00
Qiang Xue
4f8c037a21 fixed unset. 2014-03-06 21:18:28 -05:00
Qiang Xue
9b8ffdfacc Fixes #2653: Fixed the bug that unsetting an unpopulated AR relation would trigger exception (qiangxue) 2014-03-06 20:38:55 -05:00
Qiang Xue
11baf61977 Fixed unsetting relation bug. 2014-03-06 19:19:23 -05:00
Qiang Xue
e38c4225b2 Merge commit 'bdce87b242abbff800020deba0a5c2031fc2efe7' into feature-restapi
Conflicts:
	framework/db/BaseActiveRecord.php
2014-03-06 00:00:33 -05:00
Qiang Xue
3f42d5826a REST wip. 2014-03-05 13:29:24 -05:00
Qiang Xue
993963bb94 reset batch query result when rewinding. 2014-03-05 09:00:32 -05:00
Carsten Brandt
f34a0c63a1 fixed phpdoc 2014-03-05 02:35:01 +01:00
Carsten Brandt
aa9d3b3e66 Merge branch 'master' of github.com:yiisoft/yii2
* 'master' of github.com:yiisoft/yii2: (40 commits)
  Fixes #2624: Html::textArea() should respect "name" option.
  Removed unused "use" statements
  Changed "and" to "&&"
  Used ternary operator instead of "or" for constant definition
  Removed unused variables
  Removed executable flag from asset files
  Changelog for #2607
  Added note about overriding asset bundles according to #2556
  Added some documentation to new pjax attribute
  Add unit tests
  typo fix.
  Update MessageController.php
  Update MessageController.php
  add findAndModify() method to the Collection class
  Add an option to ignore pjax request on some links.
  fix code style php5.4 syntax
  Inline control structures are not allowed
  fix code style
  fix code style
  fix typo double `;`, `Each PHP statement must be on a line by itself`
  ...
2014-03-05 02:33:30 +01:00
Carsten Brandt
80cc310895 updated phpdoc references of BaseAR to the interface
fixes #2623
2014-03-05 02:32:45 +01:00
Alexander Makarov
12d4615039 Changed "and" to "&&" 2014-03-04 22:28:52 +04:00
AlexGx
6d72c6a723 fix code style 2014-03-04 06:27:22 +02:00
AlexGx
eaaa5b1bb5 fix code style 2014-03-04 06:12:30 +02:00
AlexGx
c6183fc205 fix typo double ;, Each PHP statement must be on a line by itself 2014-03-04 05:59:17 +02:00
Alexander Mohorev
95ea1c20bb code style. FOREACH 2014-03-03 21:47:47 +03:00
Alexander Mohorev
c7e8d8b900 @param, @var, @property and @return must declare types as boolean, integer, string, array or null 2014-03-03 20:50:44 +03:00
Carsten Brandt
56f52f87d2 fixed AR class docs, do not break comment 2014-03-02 18:13:48 +01:00
Qiang Xue
4408f520c3 Merge commit 'ec05c0eaf7060d13a23828c0c2e64137dde4bd61' into feature-restapi 2014-03-01 21:12:15 -05:00
Qiang Xue
a2edf01c85 Delay joinWith till createCommand to correctly combine relation condition with primary condition. 2014-03-01 18:39:22 -05:00
Qiang Xue
6c88183be0 Merge commit 'd3ff343e5ee02a14dd17d6cf947aa7f52857474a' into feature-restapi
Conflicts:
	framework/helpers/BaseArrayHelper.php
2014-02-28 18:22:10 -05:00
Qiang Xue
9beba31fc0 rest WIP 2014-02-28 08:34:51 -05:00
Jacob Morrison
0e2b2fcbe6 Fix for logic Query::queryScalar uses to check for SELECT DISTINCT 2014-02-27 16:59:47 -08:00
Jacob Morrison
a3e128bb0b Query::queryScalar wasn't making SELECT DISTINCT queries subqueries 2014-02-27 16:04:16 -08:00
Carsten Brandt
33d6acba25 Improved behavior support, fixes #2550
call hasMethod() instead of using method_exists
2014-02-26 14:18:24 +01:00
Qiang Xue
c79d233ea4 Fixes #2552. 2014-02-26 07:10:47 -05:00
Carsten Brandt
d3d832a3bf phpdoc fixes 2014-02-25 12:51:08 +01:00