147 Commits

Author SHA1 Message Date
cbad97c78d change back the visibility of findTableNames to protected. 2013-12-29 09:51:36 -05:00
795c74100d reverted #1598 and added a test for it 2013-12-26 01:18:55 +01:00
0345191245 Added ActiveQuery::innerJoinWith(). 2013-12-24 21:27:13 -05:00
4f44bb2416 Fixes #1581: Added ActiveQuery::joinWith() to support joining with relations 2013-12-24 00:08:49 -05:00
2402d2d031 Draft implementation of ActiveQuery::joinWith(). 2013-12-23 22:26:44 -05:00
164ddf98b0 Fixed test break. 2013-12-04 00:06:01 -05:00
b868e91fee Fixed test break. 2013-12-03 23:52:21 -05:00
0390a99833 Use backquotes to quote column and table names for sqlite (related with #1318) 2013-11-28 09:04:16 -05:00
b6b2689853 Merge branch 'master' into elasticsearch
* master:
  Fixes #1253
  Fixes #1310: ActiveRelation does not preserve order of items on find via() and viaTable()
  fixed limit/offset for sqlite,mysql and cubrid
  fixed test break.
  Fixed test break.
  Fixes #1301: fixed scenario generation when there are "except" scenarios.
  support for batch insert in sqlite older than 3.7.11
  Fixes #1298: supporting route with trailing slash.
  Fixes #1296: stricter check of dashes in route.
  Fixes #1307: move batchInsert() to base class.
  Update apps-advanced.md
2013-11-24 20:51:26 +01:00
643593737d added test case for #1310 2013-11-24 20:45:50 +01:00
f017ba357f refactored unit tests. put common AR tests in trait 2013-11-24 19:18:16 +01:00
e9fcde3264 support for batch insert in sqlite older than 3.7.11 2013-11-24 11:53:27 +01:00
c6347d6d01 polished elasticsearch AR api, added mget and fixed AR::equals() 2013-11-23 15:26:00 +01:00
bc4324c041 Merge branch 'master' into redis
* master: (613 commits)
  fixed typo
  Fixes #1222: refactored jui/Widget, intorduced jui/Slider and jui/SliderInput
  Correct Nav.php comments/PHP doc to reflect BS3 dropdown support.
  Correct Nav.php comments/PHP doc to reflect BS3 dropdown support.
  Correct Nav.php comments/PHP doc to reflect BS3 dropdown support.
  Added example for dividers to bootstrap Nav
  Checkboxlist documentation fix
  Added "Using controller action to render errors"
  Fix doc
  Renamed DetailView attribute type to format
  encode email in Formatter
  Added default status code setting.
  "yii\swiftmailer\Mailer" transport setup has been advanced to support constructor arguments and plugins.
  fix rbac select statement
  Comments cleanup.
  Reverted closeButton
  Nomenclature and code realignment.
  better nginx config
  guide about using bootstrap less files
  Include Schema in new migrations by default
  ...

Conflicts:
	framework/yii/db/ActiveRecord.php
	framework/yii/db/ActiveRelation.php
	tests/unit/data/config.php
2013-11-22 15:04:08 +01:00
77840adf65 Made ActiveRecord::isPrimaryKey() public
+ added tests and fixed behavior
2013-11-16 16:53:50 +01:00
9448c3d471 added unit tests for active dataprovider and fixed query tests 2013-11-13 19:35:44 +01:00
b0b1c27c85 Fix phpDoc var tag format 2013-11-12 06:21:04 +02:00
9862ee35b2 Fixes #1115: fixed the issue with PDO boolean value binding with pgsql 2013-11-03 18:51:16 -05:00
433958b40c removed sqlite specific test as it is the same as base AR test now 2013-11-03 15:50:11 +01:00
26c7f6d62f Fixed sqlite column type detection bug. 2013-11-03 09:02:17 -05:00
c8c377e698 skip test on postgres 2013-11-01 18:10:57 +01:00
ee1689da03 some more on active record unit tests and sqlite
sqlite does not seem to allow using boolean values in select query
2013-11-01 17:57:28 +01:00
937a55f4fa fixed unit test for sqlite 2013-11-01 17:39:49 +01:00
f153ce443a reverted non working fix for #1115 2013-11-01 17:20:19 +01:00
e5a1244e0f moved unit test from cubrid to general
should be tested for all dbms not only cubrid even if the problem may
not exist in all of them it is good to verify that.
2013-11-01 16:46:41 +01:00
34945b0b69 added unit test to verify storing of null values
http://www.yiiframework.com/forum/index.php/topic/48359-inserting-nulls/page__view__findpost__p__226019
2013-10-29 18:27:20 +01:00
c62e0cbbfb added unit test to verify AR afterSave isNewRecord value
closes #1084
2013-10-28 10:48:18 +01:00
ee2af2661c Removed unneeded use statements 2013-10-24 03:12:25 +04:00
1f6a823073 Short array syntax 2013-10-18 20:52:38 +04:00
a1e5fa356e fixed cubrid schema test for pdo type 2013-10-15 04:53:33 +02:00
598d01287b added cubrid specific pdo type casting
cubrid pdo does not support PARAM_BOOL so we cast the value to integer
and store 0 and 1 instead

fixes #964
2013-10-15 03:37:46 +02:00
8c1c3c59d9 Better AR connection init in tests 2013-10-15 01:39:19 +04:00
d75ad87e06 Merge branch 'add-tests' of github.com:suralc/yii2 into suralc-add-tests
Conflicts:
	framework/yii/validators/RegularExpressionValidator.php
2013-10-15 01:31:59 +04:00
8899aaeb5b moved getPdoType() to Schema. 2013-10-14 08:28:56 -04:00
b42f4b4ea0 fixed broken test 2013-09-25 12:45:07 +02:00
3623fc19dc refactored redis AR pk and findByPk 2013-09-24 19:04:38 +02:00
563171eba4 moved redis out of yii\db namespace 2013-09-18 17:09:40 +02:00
d8d6d1e368 Merge branch 'master' into redis
* master: (156 commits)
  added property docs to AR test classes
  moved getPDOType() back to Command to avoid dependency on Schema
  updated @property annotations of web\Request
  moved redis out of yii\db namespace
  Fixes #884.
  Supports sending CSRF token via HTTP header.
  Use .prop() instead .attr().
  use meta tags to pass CSRF token.
  Added memcached service in Travis YAML
  fixed typo
  cleanup db `use` statements
  doc fix.
  Better strtr arguments format
  Modified js registration position.
  renamed Request::csrfTokenName to csrfVar. added version, csrfVar and csrfToken to yii js module.
  Advanced application enhancements.
  Basic application enhancements.
  Better phpdoc for AccessControl
  Security::generateRandomKey enhancements:
  Fixes #875: Security::generateRandomKey() can now be safely used in URLs
  ...

Conflicts:
	.travis.yml
	framework/yii/caching/RedisCache.php
	tests/unit/framework/caching/RedisCacheTest.php
2013-09-18 16:37:56 +02:00
ef13a11f66 moved getPDOType() back to Command to avoid dependency on Schema
fixes #854
2013-09-18 16:29:16 +02:00
949dda5fdb tagged tests with @group tags 2013-09-14 12:49:47 +02:00
d3740932a4 fixed broken cubrid tests
fixed expected quoting
2013-09-14 11:12:48 +02:00
6c6cb3cd90 Fixes #853: Added composite FK support for SQLite. 2013-09-13 20:41:40 -04:00
02fd82c42a Fixed build break. 2013-09-13 20:19:50 -04:00
6fe152da7e Reverted 0bf2dad: it's very common to use lower case for column types and upper case for other DB keywords. 2013-09-13 20:13:46 -04:00
164c70eebc Add support for composite FK to cubrid 2013-09-06 15:32:33 +02:00
8abeed03bd added SchemaTest 2013-09-06 15:03:57 +02:00
544e412af8 unit test cleanup 2013-09-06 15:03:25 +02:00
e996f3dfd5 Workaround for broken PDO::quote() in CUBRID 9.1.0
http://jira.cubrid.org/browse/APIS-658
2013-09-06 13:53:33 +02:00
58f8293b84 custom bindValue test for cubrid 2013-09-06 13:24:36 +02:00
791f9d3f4e better use int for boolean representation
bit has special syntax for storing and retreiving so we'd need a
converter for that.
Storing 1 bit will result in one byte left padded on the disc so the
result of a query for boolean 0 will be 0x00 and for boolean 1 will be
0x80.
2013-09-06 13:21:35 +02:00