Commit Graph

724 Commits

Author SHA1 Message Date
Carsten Brandt
d0c6cb7700 abort removing duplicate records when pk is not in result set
in this cases it does not make sense to remove duplicates as the result is not on record level anymore.
This could be the case after GROUP BY has been applied.

fixes #8772
2015-06-14 19:29:57 +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
Qiang Xue
3e295a9dba Merge pull request #8712 from mongosoft/master
PSR-2 code style fixes
2015-06-08 20:13:14 -04:00
Alexander Mohorev
afe21a986a PSR-2 anonymous functions 2015-06-09 00:14:44 +03:00
Alexander Mohorev
ae42a054bb PSR-2 spaces, commas, etc 2015-06-09 00:05:06 +03:00
Alexander Mohorev
789cdfea86 PSR-2 switch statement 2015-06-08 23:28:44 +03:00
Paul Klimov
28877f8e99 Merge pull request #8652 from klimov-paul/8627-invalidate-table-schema-cache
Fix #8627: invalidate table schema cache on DDL
2015-06-08 21:18:58 +03:00
Alexander Mohorev
651ed4ee2c Undefined class NotSupportedException 2015-06-08 16:11:16 +03:00
Alexander Mohorev
2134c72bb0 Undefined class Expression 2015-06-08 16:10:41 +03:00
Alexander Mohorev
2288f339e6 Parameter type is not compatible with declaration 2015-06-08 16:07:27 +03:00
Klimov Paul
e683e3e79d Schema refresh moved to Migration::init(). 2015-06-08 11:32:09 +03:00
Paul Klimov
8e4518c81f Doc comments updated 2015-06-06 13:05:43 +03:00
Paul Klimov
0bfa2e2673 Reset of refreshTableName on yii\db\Command reuse ensured 2015-06-06 12:58:36 +03:00
Carsten Brandt
f68e970de2 link to PHP classes just as we do with normal classes
apidoc can handle this!
2015-06-05 21:53:24 +02:00
Carsten Brandt
ec76a3015a use yii\base\Event in BaseAR to fix phpdoc reference 2015-06-05 21:26:55 +02:00
Klimov Paul
6ea19e8f45 Schema refreshing added to yii\db\Migration::execute() 2015-06-04 13:56:23 +03:00
Klimov Paul
72f9e63e10 Table schema auto refreshing on DDL added to yii\db\Command 2015-06-04 13:53:11 +03:00
Klimov Paul
fb0062114e Method yii\db\Schema::refreshTableSchema() added 2015-06-04 12:57:16 +03:00
Klimov Paul
0d48f1041e Fixed yii\db\Command::getRawSql() unable to parse params specified without colon (':') 2015-06-02 13:45:28 +03:00
Carsten Brandt
0959b5d28e updated docs about dirty attributes
fixes #8619
2015-06-01 21:26:47 +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
Klimov Paul
a849e815df Fixed yii\db\ActiveQuery produces incorrect SQL for aggregations, when sql field is set 2015-05-29 13:18:20 +03:00
Carsten Brandt
aa5887fec7 added missing use statement to fix #8572
- added unit tests for timestamp behavior and insert with expression
- fixed issue #8572

close #8596
2015-05-29 01:37:47 +02:00
Klimov Paul
467596633d Code optimization 2015-05-26 12:00:28 +03:00
Klimov Paul
51a442d6c8 Fixed yii\db\ActiveRecord does not updates attribute specified at optimisticLock() after save 2015-05-26 11:53:34 +03:00
John Was
57db031d1c Merge branch 'master' into 7374-inserting-ar-without-values 2015-05-24 23:29:40 +02:00
John Was
a63fc2ff59 properly quote sequence name in Schema::getLastInsertId()
fixes #8483
close #8515
2015-05-21 22:42:34 +02:00
Klimov Paul
68351e7d8f yii\db\ActiveQuery::removeDuplicatedModels() throws exception if model primary key is empty 2015-05-19 10:11:09 +03:00
Carsten Brandt
cca47b5469 ensure primary key string comparison is made identical
this is to avoid cases where string primary keys starting with '0e'.

See http://securityaffairs.co/wordpress/36732/hacking/php-hash-comparison-flaw.html

Other parts of Yii 2, escpecially the security and auth parts, are **not** affected.
2015-05-16 00:15:52 +02:00
Qiang Xue
42fd70b2a1 exception message fix 2015-05-10 15:40:41 -04:00
Qiang Xue
4488dbbff7 build cleanup [skip ci] 2015-05-10 13:29:32 -04:00
Jan Waś
ec920d2881 add missing schema name conditions for mssql
close #8046
fixes #6234
2015-05-10 00:31:43 +02:00
Klimov Paul
582b7606ac Fixed yii\db\ActiveRelationTrait::populateRelation() fails when link refers to array string convertable object attribute 2015-05-08 11:17:35 +03:00
Qiang Xue
5d4780da21 Fixes #8268: Allow QueryBuilder to recognize more variations of limit and offset values 2015-05-05 22:28:50 -04:00
laszlovl
8c22270591 db Command performance tweak 2015-05-03 21:03:55 +02:00
vbelogai
672510d521 Update Schema.php
insert: added $columnSchemas initialization; added size parameter to pdoStatement->bindParam
2015-04-28 15:46:10 +03:00
Carsten Brandt
21f51400ef added information about quoting to batch insert 2015-04-27 10:22:56 +02:00
Qiang Xue
e6b09bb82f Fixes #7888 doc fix [skip ci] 2015-04-26 23:03:26 -04:00
Carsten Brandt
b0be36668e slight refactoring for #8179 2015-04-26 21:32:50 +02:00
Thiago Talma
4970fb1e95 if...else 2015-04-25 22:36:40 -03:00
Thiago Talma
4bb9ec8906 new param 2015-04-24 14:32:09 -03:00
Thiago Talma
815ca6b444 Compare it equals 2015-04-24 12:45:15 -03:00
Klimov Paul
faf7bb73fa redundant call chain removed 2015-04-24 14:34:07 +03:00
Klimov Paul
4503cae876 code style fix 2015-04-24 13:47:44 +03:00
Klimov Paul
c0fc4596e2 Fixed yii\db\ActiveRelationTrait::populateRelation() fails when link refers to string convertable object attribute, like \MongoId 2015-04-24 13:42:47 +03:00
Carsten Brandt
ef662b57be added missing @since annotations 2015-04-24 12:09:40 +02:00
Klimov Paul
1c1cfd5e2d yii\db\BaseActiveRecord::getAttributeLabel() refactored to be recursive 2015-04-22 14:19:46 +03:00
Klimov Paul
4482d9f8f3 Merge branch 'master' of github.com:yiisoft/yii2 2015-04-22 13:10:45 +03:00
Klimov Paul
f617618172 yii\db\BaseActiveRecord::getAttributeHint() added 2015-04-22 13:10:25 +03:00
Alexander Makarov
0645622d49 Merge pull request #8151 from nkovacs/following
Grammar fix: followings -> following [skip ci]
2015-04-21 17:58:03 +03:00