Commit Graph

128 Commits

Author SHA1 Message Date
rhertogh
c1b033a15f Using ExpressionInterface instead of Expression in ActiveRecord::findbycondition() (#18188) 2020-07-20 17:54:28 +03:00
rhertogh
931f080aee Fix #18182: yii\db\Expression was not supported as condition in ActiveRecord::findOne() and ActiveRecord::findAll() 2020-07-20 00:21:41 +03:00
Albert Borsos
d2c2f63686 Fixes #17127: yii\db\ActiveRecord::findOne() now accepts table aliases 2019-03-22 15:59:26 +03:00
Dmytro Naumenko
adf8f9a32f Fixes #15931: yii\db\ActiveRecord::findOne() now accepts quoted table and column names using curly and square braces respectively 2019-01-20 17:20:43 +03:00
Carsten Brandt
b195d9e780 optimize table name 2018-03-21 18:07:30 +01:00
Carsten Brandt
0af1c05d6a yii\db\ActiveRecord::findOne() now accepts column names prefixed with table name
fixes #15931
2018-03-21 17:44:22 +01:00
Carsten Brandt
a38302fdfd improved filtering condition on yii\db\ActiveRecord 2018-03-20 11:42:28 +01:00
Alexander Makarov
5f75916cde Wording adjustments and doc enhancements [skip ci] 2018-03-20 11:20:56 +01:00
SilverFire - Dmitry Naumenko
b37f361ad7 Fixed possible SQL injection through ActiveRecord::findOne() 2018-03-20 11:20:56 +01:00
Гордиенко Владислав Юрьевич
1a1fb49426 Fixes #15522: Fixed yii\db\ActiveRecord::refresh() method does not use an alias in the condition 2018-02-01 16:13:19 +07:00
Klimov Paul
65f6b59b35 @inheritdoc notation changed 2018-01-23 13:11:24 +02:00
Robert Korulczyk
5a8c3d537b Enable phpdoc_summary rule in php-cs-fixer config (#14675)
* Enable `phpdoc_summary` rule in php-cs-fixer config.

* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
Robert Korulczyk
1501c659ac Add empty lines before return statements. (#14682) [skip ci] 2017-08-21 01:58:49 +03:00
Alexander Makarov
1f26db9fb7 Applied code style fixes 2017-07-21 15:42:06 +03:00
Carsten Brandt
0559a95db9 Fixed ambiguous column error in BaseActiveRecord::refresh()
when the query adds a JOIN by default

fixes #13757
2017-07-11 11:47:35 +02:00
Alex
6aa0ed2026 Adjusted PHP 7 return types [skip ci] 2017-07-02 20:17:46 +03:00
gagatust
6397791513 Fixed whitespaces to match code style [skip ci] 2017-03-14 09:42:13 +03:00
Klimov Paul
319e27c45c Fixed yii\db\BaseActiveRecord::deleteAll() changes method signature declared by yii\db\ActiveRecordInterface::deleteAll() 2017-02-09 12:16:04 +02:00
Carsten Brandt
30e599b94f updated docs about deleteALl() and updateAll() 2016-12-27 21:35:45 +01:00
Carsten Brandt
a3b6dfbb7b Catch \Throwable in critical places
Added catch `\Throwable` to be compatible with PHP7.
Added it in cases where object state needs to be kept consistent.

Mainly on transactions but also some other places where some values are
reset before exiting.

Most of them could probably be refactored by using `finally` in 2.1, as
that requires PHP 5.5.

fixes #12619
2016-12-16 02:20:02 +01:00
Robert Korulczyk
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
Carsten Brandt
f006db9b2b update docs of AR::update()
fixes #12461
2016-09-05 11:57:08 +02:00
Roman Grinyov
f0e999e017 Cosmetic changes (#12292) [skip ci] 2016-08-24 13:10:03 +03:00
Alexander Makarov
1f7134634b Use static:: instead of $this for static method calls 2016-02-16 14:06:23 +03:00
Carsten Brandt
e43c41c9ea db layer phpdoc fixes 2016-02-07 16:33:26 +01:00
githubjeka
5326b7aaf6 refactoring for getTableSchema 2016-01-19 15:19:04 +03:00
Alexander Makarov
5ab4f0f090 Better quotes usage in strings
- Use single quote where interpolation isn't necessary
- Use interpolation when it's better than concatenation
2015-10-10 00:23:52 +03:00
Carsten Brandt
6d9fe671de various code style and whitespace adjustments 2015-08-02 00:27:19 +02:00
Carsten Brandt
30f003381d revised AR documentation
fixed some incorrectness in update() and insert() and also fixes #8761
2015-06-12 00:55:12 +02:00
Alexander Makarov
67658cf57d Replaced static with $this in phpdoc since current IDEs are finally able to handle it correctly 2015-05-31 13:39:30 +03:00
Jan Was
5f099b3f8d Merge branch 'master' into 7374-inserting-ar-without-values 2015-04-21 09:49:46 +02:00
Klimov Paul
6751a80ea0 yii\db\Schema::insert() now returns primary key value for empty sequence 2015-04-20 11:22:58 +03:00
Klimov Paul
b05ea3d69e PK typecast at yii\db\ActiveRecord restored 2015-04-14 12:00:22 +03:00
Paul Klimov
4e8ee7b001 Use RETURNING for inserts for pgsql and oci to support PKs with a custom default value expression 2015-04-13 17:11:00 +03:00
Qiang Xue
fdb730a12a syntax fix [skip ci] 2015-04-10 21:51:33 -04:00
Jan Waś
6e48ed05c7 allow calling Command::insert() without any columns 2015-04-11 02:20:13 +02:00
Carsten Brandt
817bd4279a fixed AR phpdoc
fixes #7787
2015-03-19 12:59:05 +01:00
Alexander Kochetov
29f5dc37a5 Correct phpDoc for return in several cases
close #6733
2015-02-28 23:49:16 +01:00
Carsten Brandt
2897257ec1 fixed wrong docs about loadDefaultValues() and init()
fixes #7373
2015-02-24 20:51:47 +01:00
Angel Faryshta Guevara
ffe940180c simplify findByCondition 2015-02-03 16:31:00 -05:00
Qiang Xue
780fdd611a Fixes #6710 2014-12-31 10:55:54 -05:00
Alexander Kochetov
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
Carsten Brandt
db56384fcf improved documentation about loadDefaultValues()
issue #6126
2014-11-20 11:50:32 +01:00
Carsten Brandt
73cb5f8aac changed syntax for referencing the guide in apidoc
New syntax:

```
[link to guide](guide:file-name.md)
[link to guide](guide:file-name.md#subsection)
```

fixes #4719
2014-09-05 14:59:22 +02:00
Carsten Brandt
f099616967 improved IDE autocompletion for AR::find()
[ci skip]
2014-08-12 23:21:34 +02:00
Carsten Brandt
25bf486b7f save some function calls on AR insert 2014-08-12 18:13:49 +02:00
Carsten Brandt
3a1e0f3a5c property codestyle framework 2014-07-30 00:21:31 +02:00
Qiang Xue
e8c6bb516f Fixes #4048: Added init event to ActiveQuery classes 2014-07-19 20:26:58 -04:00
Vladimir Zbrailov
44f20c61a0 changedAttributes of AfterSaveEvent contain an old values 2014-06-27 18:51:21 +04:00
Carsten Brandt
27943ce735 Merge pull request #4063 from yiisoft/typecast-split
split typecast method into two
2014-06-27 02:14:31 +02:00