81 Commits

Author SHA1 Message Date
99a612e1a6 Finished AR guide [skip ci] 2015-03-15 01:26:06 -04:00
bd20b30b89 AR guide WIP [skip ci] 2015-03-09 22:43:24 -04:00
29f5dc37a5 Correct phpDoc for return in several cases
close #6733
2015-02-28 23:49:16 +01:00
89d1e55f91 phpdoc fix, close #7404 2015-02-24 13:26:01 +01:00
6481d13494 Optimized checks order in conditions 2015-02-08 17:56:36 +03:00
ffe940180c simplify findByCondition 2015-02-03 16:31:00 -05:00
d5176a463f better exception message
- yii\db\BaseActiveRecord::findByCondition better exception
- yii\db\ActiveRecord::findByCondition better exception

close #6704
2014-12-31 14:53:44 +01:00
073982ab0a Update BaseActiveRecord.php
The exceptions thrown on error are db exceptions.
2014-11-30 21:02:43 +01:00
83b0b3d480 Fixes #6311: Optimistic lock for ActiveRecord does not work as expected 2014-11-29 20:10:53 -05:00
38d0570843 fixed unlink() for array valued attributes
return value would not be a valid array when json encoded after unlink().

fixes #6065
2014-11-15 21:42:36 +01:00
cba52e3c5e Fixes #5382: renamed "pivot table" to "junction table" since it's correct term to use 2014-10-07 01:13:17 +04:00
aeaf0511d2 Fixes #3725: Fixed the bug that the filtering condition used in relation definition was ignored when calling ActiveRecord::unlinkAll() 2014-09-22 16:36:55 -04:00
7cf358af03 Fixes #4607: AR model will throw an exception if it does not have a primary key to avoid updating/deleting data massively 2014-08-12 21:54:08 -04:00
0edd8bc65a Fixed missing and incorrect phpdoc 2014-07-25 17:26:35 +04:00
67bd4972ba Check availabilty field in BaseActiveRecord::populateRecord
check with Object::canSetProperty()

fixes #4305, close #4211
2014-07-23 13:49:55 +02:00
d036d2f5bf add support for array valued attr relations to unlink and link 2014-07-23 01:25:33 +02:00
05e21b7291 Fixes #4135 2014-07-01 14:49:41 -04:00
1085f1bd9b cleanup after #4092
fixes #4086
2014-06-29 13:29:23 +02:00
7113a23a45 change PhpDoc of param 2014-06-27 18:59:44 +04:00
44f20c61a0 changedAttributes of AfterSaveEvent contain an old values 2014-06-27 18:51:21 +04:00
86f06677e9 Refactored AR findOne() and findAll(). 2014-06-25 21:31:15 -04:00
7b13c370e9 fixes #3681, disambiguate PK in findOne and findAll 2014-06-25 20:57:20 +02:00
edb95052e8 use an AfterSaveEvent class to be consistent 2014-06-25 19:53:00 +02:00
b0fb04efd4 fixed test break and wrong parameter 2014-06-25 00:48:29 +02:00
0899b8d474 changed updateAttributes to be more simple update
fixes #3233
2014-06-25 00:29:49 +02:00
2cab70b064 Ensure consistent behavior in ActiveRecord::afterSave()
fixes #4012
2014-06-25 00:29:34 +02:00
0c14f47f9a Fixes #3793: Changed inline autocomplete hints style to get more IDEs support 2014-06-20 17:40:00 +04:00
d92281dcda refactored ActiveRecord::unlinkAll() to work will noSQL
issue #3520
2014-06-04 14:28:57 +02:00
a5c4a0ebb4 Adjusted BaseActiveRecord code for better noSQL compatibility 2014-06-02 20:13:48 +04:00
5599a86a81 Add support all type relation 2014-05-22 00:53:12 +03:00
e11ec66b06 add change to CHANGELOG,and mini refactoring 2014-05-20 22:20:51 +03:00
a047bf2cd6 Method to unlink all relationship many to many in current model 2014-05-20 21:39:16 +03:00
d041116b94 BaseActiveRecord::findAll() comment fix 2014-05-06 16:18:01 +04:00
76d8e2b5b3 code style, fixes #3140 2014-04-17 13:24:16 +02:00
c1445871f4 Correction of many errors code inspection.
Adjustments code according to the standards.
Adding missing PHPDoc comment.
2014-04-16 19:29:07 -03:00
33a00ecd7c updated base AR phpdoc for findOne() and findAll() 2014-04-11 17:45:22 +02:00
c6e1a2f02f Merge branch 'master' of github.com:yiisoft/yii2
* 'master' of github.com:yiisoft/yii2: (79 commits)
  Refactored app bootstrap logic.
  Update authorization.md
  Fixes #3052: Fixed the issue that cache dependency data is not reused when `reusable` is set true
  start debug logging only if debug runs when bootstrap.
  Update finnish translation
  Add ODBC support to yii\db\Connection
  updated error handler and requirement checker links.
  fixed broken API links [skip ci]
  added more doc [skip ci]
  update class map.
  Fixes #2034: Added `ContentNegotiator` to support response format and language negotiation
  renamed attributes to attributeNames in model
  updated phpdoc
  Removed `Application::preload` in favor of `Application::bootstrap`
  Update module-debug.md
  Update model.md
  Fixes
  Update basics.md
  typo fix [skip ci]
  Added `HtmlResponseFormatter` and `JsonResponseFormatter`
  ...
2014-04-10 22:22:36 +02:00
3c400dbca8 fixed file PHPdoc
issue #3026
2014-04-10 22:10:59 +02:00
fa767ceaca renamed attributes to attributeNames in model
fixes #3034
2014-04-09 18:54:53 +02:00
0e143338d7 Finished refactoring find() . 2014-04-07 16:29:12 -04:00
b7d6f6141a Added isAssociative() and isIndexed() to yii\helpers\ArrayHelper 2014-04-07 16:02:55 -04:00
75154d351d Refactored AR find 2014-04-07 09:43:03 +04:00
8b4dfcc876 Fixes #2955: Changed the signature of ActiveQuery constructors and ActiveRecord::createQuery() to simplify customizing ActiveQuery classes 2014-04-03 10:36:52 -04:00
338b6aa7d3 Refactored ActiveRecord::find() so that find(null) will also return an ActiveRecord instance instead of ActiveQuery. 2014-03-30 19:01:02 -04:00
c73cfe147f Fixed inconsistencies with setting old attributes and pks
issue #2892
2014-03-27 13:17:54 +01:00
f4395206b7 reset dirty attributes after afterSave
so information about changed values is available in `afterSave`-event.

fixes #2892
2014-03-27 12:14:03 +01:00
8a6eceb852 phpdoc fixes 2014-03-26 15:13:11 +01:00
bf3c75147d reverted breaking PHPdoc codestyle changes
issue #2852
2014-03-23 20:51:09 +01:00
b5f8a4dc22 Reformat code te be PSR-2 compatible 2014-03-16 10:46:21 +06:00
6fff5662df better use @see for See in phpdoc 2014-03-11 05:38:35 +01:00