Commit Graph

298 Commits

Author SHA1 Message Date
Carsten Brandt
56f52f87d2 fixed AR class docs, do not break comment 2014-03-02 18:13:48 +01:00
Qiang Xue
a2edf01c85 Delay joinWith till createCommand to correctly combine relation condition with primary condition. 2014-03-01 18:39:22 -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
Jacob Morrison
614bffb01a Fixed issue with preventing from clearing events and behaviors on clone 2014-02-24 18:15:19 -08:00
Carsten Brandt
f9024dbec1 fixed Migration::execute() to use params correctly 2014-02-24 17:37:43 +01:00
Qiang Xue
3aa15b709f CS fix. 2014-02-24 07:35:07 -05:00
Qiang Xue
4b930e1d10 Merge pull request #2526 from skotos/master
nulls in batchInsert. Patch available.
2014-02-24 07:34:10 -05:00
Qiang Xue
ba2c35b894 Fixes #2482. 2014-02-23 18:09:25 -05:00
Scott Tester
7ce4702426 Allow null values for fields in batchInsert 2014-02-24 07:18:56 +11:00
Carsten Brandt
26717e3e76 allow referencing the guide from API docs 2014-02-22 13:43:57 +01:00
Carsten Brandt
5ee50a8454 Merge pull request #2497 from yiisoft/merge-query-and-relation2
WIP merge ActiveRelation into ActiveQuery
2014-02-21 19:00:45 +01:00
Carsten Brandt
505762d49c updated docs about active relation 2014-02-21 18:53:28 +01:00
Carsten Brandt
8f491f2836 moved @include tags of api docs directly into the class 2014-02-20 21:30:47 +01:00
Carsten Brandt
cb8237c1b7 merged ActiveQueryInterface and ActiveRelatioInterface 2014-02-20 16:15:10 +01:00
Carsten Brandt
098567ce16 fixed phpdoc errors and updated properties 2014-02-20 13:42:30 +01:00
Carsten Brandt
3b40d44909 made createQuery() config param optional 2014-02-20 05:54:47 +01:00
Carsten Brandt
1708a36d95 WIP merge ActiveRelation into ActiveQuery
allow extending only one class to add scopes, fixes #2146

TODO:

- [ ] adjust guide docs
- [ ] adjust README files of extensions
- [ ] finish work and fix test breaks
2014-02-20 05:53:36 +01:00
Qiang Xue
fb3b2f2c7d Fixes #2490: yii\db\Query::count() and other query scalar methods now properly handle queries with GROUP BY clause 2014-02-19 08:38:43 -05:00
Qiang Xue
c92a260a3d Fixes #2415: Added support for inverse relations 2014-02-18 19:43:05 -05:00
Qiang Xue
76f6896b22 doc fix. [skip ci] 2014-02-16 13:41:17 -05:00
Sergey Gonimar
ee2a6b7e76 Update Migration.php 2014-02-16 14:05:07 +05:00
Qiang Xue
e1f4a9cc8f Added Connection::enableSavepoint. 2014-02-15 23:00:30 -05:00
Qiang Xue
bea9e3fc06 Fixes #1645: Added support for nested DB transactions 2014-02-15 22:16:09 -05:00
Qiang Xue
abb2a0db97 minor improvement of label generation. 2014-02-15 14:25:32 -05:00
Qiang Xue
10e7bca3f4 Merge pull request #2443 from djagya/2436-related-model-attributes
#2436 receive label of the attribute from related model
2014-02-15 11:38:21 -05:00
Qiang Xue
9a068f50f4 Refactored batch query. 2014-02-15 11:22:48 -05:00
djagya
da16f508c2 #2436 override the function getAttributeLabel in BaseActiveRecord to receive label of the attribute, which looks like relatedMode.attribute, from the related model 2014-02-15 12:19:27 +01:00
djagya
44f5c73111 #2436 override the function getAttributeLabel in BaseActiveRecord to receive label of the attribute, which looks like relatedMode.attribute, from the related model 2014-02-15 12:08:10 +01:00
Qiang Xue
3a930bd675 Finished batch query feature. 2014-02-14 18:13:42 -05:00
Qiang Xue
1571c72251 Fixes #2409: Added support for fetching data from database in batches 2014-02-14 16:45:46 -05:00
Qiang Xue
e79af9117e ensure populateRelation() is called for lazy loading. 2014-02-14 10:07:19 -05:00
Qiang Xue
f59598bb8b Added support for building SQLs with sub-queries 2014-02-11 23:23:02 -05:00
Carsten Brandt
8af941fb53 added note about usage to AR::instantiate()
fixes #2370
2014-02-10 10:51:16 +01:00
Alexander Makarov
dd26d39dd8 Removed unused namespace imports 2014-02-07 13:26:00 +04:00
Qiang Xue
1f42b72baa Fixes #2346: ActiveQuery used in building sub-query should not need to set FROM clause explicitly. 2014-02-06 10:39:27 -05:00
Alexander Makarov
eb3c6866dd Removed unused variable 2014-02-06 00:46:50 +04:00
Carsten Brandt
4a9f47bedd refactored sphinx and db AR to call parent implementation of populateRecord() 2014-02-03 14:12:03 +01:00
Carsten Brandt
16e1aff41b renamed ActiveRecord::create() to populateRecord()
- refactored elasticsearch AR to make type and index available in
  instantiate(), issue #1313

fixes #2281
2014-02-03 14:07:12 +01:00
Qiang Xue
266aadd230 Only treat 32bit signed integers as integers so that 32bit clients won’t have trouble. 2014-02-02 17:18:03 -05:00
Qiang Xue
8001d2348c refactored ActiveRecord::create(). 2014-02-02 15:00:54 -05:00
Vladimir Zbrailov
a97f6387f9 added check column 2014-02-02 22:36:56 +04:00
Vladimir Zbrailov
0e0acb2731 added inherit doc block and task number 2014-02-02 20:22:56 +04:00
Vladimir Zbrailov
d017567273 override create 2014-02-01 22:31:13 +04:00
Vladimir Zbrailov
903f5618fe Added typecast database types into php types 2014-02-01 12:57:40 +04:00
Alexander Makarov
b21fd298c5 Fixed minor coding style issues 2014-02-01 01:18:38 +04:00
Qiang Xue
8e11629a65 Fixes #2160: SphinxQL does not support OFFSET
Improved `QueryBuilder::buildLimit()` to support big numbers
2014-01-29 22:42:56 -05:00