Commit Graph

318 Commits

Author SHA1 Message Date
Carsten Brandt
d2aab58d09 Merge PR #2705 branch '1849-additions' of https://github.com/resurtm/yii
* '1849-additions' of https://github.com/resurtm/yii:
  Additions to #1849.
  removed unnecessary spaces
  replaced spaces to tabs
  fix changelog
  fix changelog
  #1515  Use index support in relations
2014-01-28 12:06:38 +01:00
Carsten Brandt
1273438eee Merge PR #2885 branch 'revert-2048' of https://github.com/cebe/yii
* 'revert-2048' of https://github.com/cebe/yii:
  added changelog line for #2884
  added unit test for #2884
  fixed wrong dependency in unit test
  reverted #2048 as it breaks logic in createFindCommand()

Conflicts:
	CHANGELOG
2014-01-28 12:00:04 +01:00
Klimov Paul
dd1558b19c Event class name in doc comments for "CActiveRecordBehavior::afterSave()" fixed. 2014-01-11 18:35:20 +02:00
munawer-t
89b0bcad8a spacing fix 2014-01-07 17:45:45 +05:30
munawer-t
2ed6c2d181 Use tab spacing 2014-01-07 17:37:33 +05:30
munawer-t
ea84745b43 Apply changes as per comment 2014-01-07 17:07:09 +05:30
munawer-t
32bc867bf6 Doc typos and corrections 2014-01-07 15:23:17 +05:30
Alexander Makarov
dcec697c06 Fixes #3115: Updated phpdoc for better code completion in modern IDEs 2013-12-31 12:12:09 +01:00
Carsten Brandt
eab509ff98 Allow changing the AR database in beforeCount()
like it is possible in beforeFind() already.

fixes #3014
2013-11-06 14:48:02 +01:00
Paul Klimov
95078cda98 'CJoinQuery::createCommand()' fixed to exclude duplicating joins. 2013-10-21 12:29:05 +03:00
Paul Klimov
a49e82999b Added support for scopes in CStatRelation 2013-10-02 15:37:56 +03:00
Carsten Brandt
9356b42c81 reverted #2048 as it breaks logic in createFindCommand()
fixes #2884
2013-09-18 13:59:05 +02:00
Borro
f94e868ad0 Bug #2874: Fixed duplicate columns selection for HAS_MANY relation with composite primary key 2013-09-17 13:52:46 +04:00
Carsten Brandt
f5e592f22d better fix for #2378 2013-09-04 15:05:17 +02:00
Carsten Brandt
10b4b0f063 Merge branch '2738-ActiveRecord.tableName' of https://github.com/velosipedist/yii into velosipedist-2738-ActiveRecord.tableName
* '2738-ActiveRecord.tableName' of https://github.com/velosipedist/yii:
  removed occasional FormInput file
  fix #2378 CActiveRecord::tableName() in namespaced model
  Ability to substitute model attribute name, to use custom data getter. It is not dangerous to use any custom fields and getters, because it will work for read-only.
2013-09-04 14:54:35 +02:00
Paul Klimov
38692ca642 Merge pull request #2605 from dizeee/patch-1
Consistent getting table schema in CActiveRecord
2013-09-03 05:30:15 -07:00
John Was
bb07a7abdd detect properly if criteria->select starts with a count() expression in CActiveFinder->count() method 2013-08-21 21:45:08 +02:00
Klimov Paul
16616abf4e Double condition applying for Active Record relation lazy loading has been fixed. 2013-08-13 11:11:21 +03:00
velosipedist
8dd39e27a1 fix #2378 CActiveRecord::tableName() in namespaced model 2013-08-07 20:20:42 +04:00
resurtm
87deced5b0 Additions to #1849. 2013-07-31 10:21:49 +06:00
resurtm
cdc5f01b90 Merge branch 'pr/1849' 2013-07-31 09:32:29 +06:00
Luis Lobo Borobia
dfa057a499 Repeated message with different punctuation and case
The message in line 1520 is different from the ones in lines 542 and 1034, only differ in punctuation and case. Changed 1520 to match 542 and 1034. Message from 1520 should disappear in next "build message" command run.
2013-07-28 01:12:44 -03:00
Konovalov Maxim
584e6053fa removed unnecessary spaces 2013-07-08 01:22:15 +10:00
Aleksei Vesnin
215ccce3e2 Consistent getting table schema in CActiveRecord
$this->getMetaData()->tableSchema replaced with $this->getTableSchema() in CActiveRecord::insert(), CActiveRecord::getPrimaryKey() and CActiveRecord::setPrimaryKey() to match usage in other methods.
2013-07-04 19:39:23 +04:00
Klimov Paul
63a3e57cc4 PR #2569 has been reverted. 2013-06-26 00:07:48 +03:00
Klimov Paul
1d64ee88d9 Redundant condition for "names" has been removed from "CActiveRecord::getAttributes()" 2013-06-25 23:41:33 +03:00
Klimov Paul
21b187776f Redundant has been removed from "CActiveRecord::refresh()" 2013-06-25 23:02:04 +03:00
Paul Klimov
6caa4822a3 "CActiveRecord::_attributes" has been renamed to "CActiveRecord::_dbAttributes". 2013-06-25 16:56:34 +03:00
Paul Klimov
4eae5a71ad Code style at "CActiveRecord" has been fixed. 2013-06-25 16:53:47 +03:00
AnatolyRugalev
f7eba14beb Fixed disrespect of overrides of CActiveRecord::attributeNames() 2013-06-18 23:06:55 +06:00
Alexander Kochetov
ab4d0ed83d BELONGS_TO through eager loading fix 2013-06-04 04:36:43 +04:00
Alexander Kochetov
9f6162f3a9 BELONGS_TO through 2013-06-02 20:06:59 +04:00
ThePepster
3bac41e6c3 Update doc block for getRelated method in CActiveRecord class. 2013-05-27 13:23:36 -06:00
ThePepster
71f1eb132d Update doc block for getRelated method in CActiveRecord class. 2013-05-27 13:15:27 -06:00
Alexander Makarov
c7a7b55201 Adjusted phpdoc, fixed code style 2013-05-27 13:59:51 +04:00
Alexander Makarov
f284867b91 Merge branch '1863_enhance_CActive_hierarchy_extensibility' of github.com:denisarius/yii into denisarius-1863_enhance_CActive_hierarchy_extensibility
Conflicts:
	CHANGELOG
2013-05-27 13:46:51 +04:00
Carsten Brandt
aebaff34c5 Merge pull request #2346 branch '662-lazy-load-through-relation' of https://github.com/klimov-paul/yii
* '662-lazy-load-through-relation' of https://github.com/klimov-paul/yii:
  Issue #662 has been added to CHANGELOG.
  "CActiveFinder::applyLazyCondition()" has been updated to use last relation in the join chain, while composing where condition.
  Test case for issue #662 has been improved.
  Test case "CActiveRecordTest::testHasOneThroughLazy()" has been added to expose issue #662

Conflicts:
	tests/framework/db/ar/CActiveRecordTest.php
2013-05-27 05:06:23 +02:00
Carsten Brandt
ffe6b94f7b Merge pull request #2350 branch '139-has-many-through-with-condition' of https://github.com/klimov-paul/yii into klimov-paul-139-has-many-through-with-condition
* '139-has-many-through-with-condition' of https://github.com/klimov-paul/yii:
  Test relation condition for "CActiveRecordTest::testLazyLoadThroughRelationWithCondition()" has been adjusted to be type aware.
  "CJoinElement::applyLazyCondition()" and "CActiveRecordTest" have been updated to match PHP 5.2.
  Issue #139 has been added to CHANGELOG.
  "CJoinElement::applyLazyCondition()" has been updated allowing to respect relation condition and params.
  Test case "CActiveRecordTest::testLazyLoadThroughRelationWithCondition()" has been improved to cover relation params as well.
  Test case "CActiveRecordTest::testLazyLoadThroughRelationWithCondition()" has been created to expose issue #139

Conflicts:
	tests/framework/db/ar/CActiveRecordTest.php
2013-05-27 03:50:05 +02:00
Paul Klimov
da49c8812b Merge pull request #2295 from klimov-paul/101-active-record-relation-merge-with
Issue 101: Active Record find through with custom select
2013-05-22 10:07:42 -07:00
resurtm
49598e9f4c Merge pull request #2306 from resurtm/fixes-2122
Fixes #2122: CActiveRecord, lazy load: 'params' from relations used in 'through' option were not applied to the final SQL statement.
2013-04-25 20:18:57 -07:00
Carsten Brandt
8ff8503d3b cleanup after #1823 2013-04-25 00:58:24 +02:00
Carsten Brandt
8051cb9d36 Merge pull request #1823 branch '1353-on-before-count' of https://github.com/jakob-stoeck/yii into jakob-stoeck-1353-on-before-count
* '1353-on-before-count' of https://github.com/jakob-stoeck/yii:
  docstring fixes #1353
  phpdoc correction for onbeforecount #1353
  Adds onBeforeCount for Active Records, fixes #1353
2013-04-25 00:53:04 +02:00
Jakob Stoeck
b7e1207a92 docstring fixes #1353 2013-04-24 13:20:14 +02:00
Paul Klimov
b2b9c3fcd2 "CJoinElement::applyLazyCondition()" and "CActiveRecordTest" have been updated to match PHP 5.2. 2013-04-16 10:51:40 +03:00
Paul Klimov
b796d00780 "CJoinElement::applyLazyCondition()" has been updated allowing to respect relation condition and params. 2013-04-15 17:09:54 +03:00
Paul Klimov
234a8bc199 "CActiveFinder::applyLazyCondition()" has been updated to use last relation in the join chain, while composing where condition. 2013-04-15 12:51:42 +03:00
Paul Klimov
156ce410c3 CStatElement ambiguous fields with join table with composite PK fixed. 2013-04-09 13:52:58 +03:00
Klimov Paul
3277db163a CActiveRecord::getMetaData() has been updated preventing recursive invokes via __get(). 2013-04-06 14:29:57 +03:00
resurtm
e2425fe6a9 Fixes #2122: CActiveRecord, lazy load: 'params' from relations used in 'through' option were not applied to the final SQL statement. 2013-04-06 12:42:35 +06:00
Paul Klimov
1d5148adeb "CActiveFinder::buildJoinTree()" has been fixed to not use "select=false" 2013-04-04 16:19:30 +03:00