Boudewijn Vahrmeijer
92eee10ae1
Change the name of method getQueryTableName and remove its $query argument ( #12893 )
...
* refactores getQueryTableName:
* replaces the $query argument with a $this implementation
* exposes getQueryTableName to be public instead of private. Fixes #12878
* added unit tests for exposed method
* updated changelog
* - methodname changed to 'getTableNameAndAlias'
- scope back to private
- added @internal tag to emphasize that the method is used purely for the internal workings of this piece of software.
- removed changelog (as the API has not changed)
* update tests
2016-12-08 21:22:18 +01:00
Robert Korulczyk
7a3a342127
Fix errors reported by apidoc extension. ( #12986 )
2016-11-13 14:51:21 +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
Laszlovl
0f640c7138
Make sure inverseOf relations are also populated during dynamic relational queries
...
Refs #6347
2016-07-04 15:07:37 +02:00
Nikola Kovacs
9d327baa8b
coding style fixes
2016-05-26 11:19:32 +02:00
Carsten Brandt
4411a74ebd
proper fix for #9425 , adjust changes from #11363
...
includes tests and fix that works in all cases.
2016-04-28 01:29:07 +02:00
Alexander Makarov
df6cdf7ad5
Fixed code style
2016-04-18 10:14:20 +03:00
PowerGamer1
806eb57990
Fixes #9425 : ActiveQuery::exists() should generate SELECT EXISTS() ( #11363 )
2016-04-16 13:34:20 +03:00
Klimov Paul
e4d9ed5182
code style fix
2016-03-09 10:17:41 +02:00
Carsten Brandt
ce35739469
joinWith implementation cleanup
2016-02-12 12:45:29 +01:00
Carsten Brandt
3f8df39f45
more tests for joinWith alias
...
also test on joining the same relation twice
2016-02-12 12:35:29 +01:00
Carsten Brandt
5f19e7aa41
Added Alias Syntax for joinWith()
...
Add alias syntax to joinWith(), e.g. joinWith('author a').
No need to know the table name for defining an alias for the relation.
fixes #2377 , alternative to #8788 , which allows later implementation of
getting alias and column name ambiguation.
depends on #10813 to be merged first.
2016-02-12 12:35:28 +01:00
Carsten Brandt
157d6c79cc
fixes #4972 by adding and alias() to ActiveQuery
...
allows defining an alias without knowing the model table name.
2016-02-12 12:34:16 +01:00
githubjeka
2b6ceb1eb7
phpDoc updated
2016-01-12 10:10:43 +03:00
Carsten Brandt
ad69b0f8cb
added note about fields that can be used in onCondition
2015-11-26 00:11:03 +01:00
Carsten Brandt
7c7ed48c4c
cleanup docs and duplicate code in query
2015-11-25 23:31:29 +01:00
Alexander Mohorev
68c30c1034
Replace aliases of functions
2015-06-29 22:59:22 +03:00
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
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
Klimov Paul
68351e7d8f
yii\db\ActiveQuery::removeDuplicatedModels() throws exception if model primary key is empty
2015-05-19 10:11:09 +03:00
Alexander Kochetov
f42cd49833
yii\db\ActiveQuery phpDoc fix
2015-01-08 02:05:37 +03:00
Alexander Kochetov
ee85dba92e
yii\db\ActiveQuery phpDoc fix
...
close #6779
2015-01-07 22:57:54 +01:00
Veaceslav Medvedev
89406502ad
Fixed typo in phpdoc
2014-12-24 00:59:13 +02:00
Alexander Mohorev
bb8550886e
PHP type casting
2014-10-25 15:30:03 +03:00
Alexander Makarov
cba52e3c5e
Fixes #5382 : renamed "pivot table" to "junction table" since it's correct term to use
2014-10-07 01:13:17 +04:00
Qiang Xue
b9c97ff2aa
Fixes #4938 : When yii\db\ActiveQuery is used to build sub-queries, its WHERE clause is not correctly generated
2014-09-12 16:46:12 -04:00
Qiang Xue
2150fa3239
Fixes #4970 : joinWith() called by a relation was ignored by yii\db\ActiveQuery
2014-09-10 15:00:15 -04:00
Stephen Seliuk
35b54345b5
Handling $query->joinWith called inside of other $query->joinWith within Closure (called inside Closure). Ex.: ``php $query->joinWith( [ 'rel1' => function($query) { $query->joinWith( [ 'rel2' => function($query) { // ... } ] ); } ] ); ``
2014-09-10 14:49:11 -04:00
slavcodev
fa8e576251
Refactored ActiveQuery::one() to be consistent with all() creation
2014-07-31 16:38:23 +03:00
Qiang Xue
e8c6bb516f
Fixes #4048 : Added init event to ActiveQuery classes
2014-07-19 20:26:58 -04:00
Alexander Makarov
593b478f2b
Added extra callable typehints
2014-07-10 19:12:05 +04:00
Alexander Makarov
0c14f47f9a
Fixes #3793 : Changed inline autocomplete hints style to get more IDEs support
2014-06-20 17:40:00 +04:00
Alexander Kochetov
ce1e469751
ActiveQuery::one() slight refactoring
2014-06-01 02:34:48 +04:00
Thiago Talma
563e7e0174
Update ActiveQuery.php
...
PHPDoc comment does not match function or method signature
Update PHPDoc Comment
Adjust code standard
2014-04-15 19:58:06 -03:00
Carsten Brandt
3c400dbca8
fixed file PHPdoc
...
issue #3026
2014-04-10 22:10:59 +02:00
Carsten Brandt
1a3accb6cb
removed duplicated joins when using joinWith and via relations
...
fixes #2650
2014-04-04 15:34:19 +02:00
Qiang Xue
54e08f3f01
fixed build break.
2014-04-03 11:57:49 -04:00
Carsten Brandt
a35ef1ce7a
added andOnCondition and orOnCondition to ActiveQuery
...
fixes #2957
2014-04-02 16:17:50 +02:00
Alexander Makarov
ab799d8ea9
Fixes #2911 : Removed tbl_ default for table prefix
2014-03-30 19:33:46 +04:00
Qiang Xue
13c0931b23
Fixes #2880
2014-03-27 10:58:56 -04:00
Qiang Xue
f3c26d3c6b
Fixes #2880 .
2014-03-26 19:52:17 -04:00
Qiang Xue
5567caf4e8
Merge branch 'master' of git://github.com/yiisoft/yii2
2014-03-26 15:03:06 -04:00
Qiang Xue
bc378d1cae
properly quote table names for join().
2014-03-26 15:02:56 -04:00
Carsten Brandt
27659d1776
fixed FileHelper private method static call
2014-03-26 17:51:52 +01:00
Carsten Brandt
9b8372d580
phpdoc
2014-03-26 14:25:00 +01:00
Carsten Brandt
488767914a
do not remove records that have no primary key selected
...
this problem occurs when joining active record but not selecting the
primary key field. records get populated but they do not have primary
key value populated which results in only one record left over in the
result.
2014-03-25 13:35:25 +01:00
Carsten Brandt
bf3c75147d
reverted breaking PHPdoc codestyle changes
...
issue #2852
2014-03-23 20:51:09 +01:00
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
2014-03-16 10:46:21 +06:00
Qiang Xue
aaa4e429a4
Fixes #2687 : table alias may not be respected when specified in relation query.
2014-03-11 20:13:03 -04:00