17 Commits

Author SHA1 Message Date
ce35739469 joinWith implementation cleanup 2016-02-12 12:45:29 +01:00
3f8df39f45 more tests for joinWith alias
also test on joining the same relation twice
2016-02-12 12:35:29 +01:00
94571e2c23 improved tests for ActiveQuery::joinWith alias 2016-02-12 12:35:29 +01:00
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
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
076329bfba add test for join with alias
close #8788
2016-02-12 12:26:34 +01:00
615a29f04e More fixes for MSSQL tests 2015-12-09 03:07:32 +03:00
8765cae71c Reverted #9656 because of BC break (reverted from commit 4a464afe9b4103d96c61f77ea6e093e45ee837c9) 2015-11-25 06:41:55 +03:00
4a464afe9b Fixes #9656: yii\db\BaseActiveRecord refactored in order to getting, setting and unsetring attribute values using the same approach 2015-11-20 15:45:12 +03:00
357bce51bb Tests for #9006 2015-07-30 19:25:52 +03:00
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
a849e815df Fixed yii\db\ActiveQuery produces incorrect SQL for aggregations, when sql field is set 2015-05-29 13:18:20 +03:00
51a442d6c8 Fixed yii\db\ActiveRecord does not updates attribute specified at optimisticLock() after save 2015-05-26 11:53:34 +03:00
57db031d1c Merge branch 'master' into 7374-inserting-ar-without-values 2015-05-24 23:29:40 +02:00
6d96d3cbee Fixed yii\db\BaseActiveRecord::updateCounters() fails for new record saved with counter attribute not set 2015-04-21 16:23:00 +03:00
5f099b3f8d Merge branch 'master' into 7374-inserting-ar-without-values 2015-04-21 09:49:46 +02:00
6949992246 Simplified tests directory structure a bit 2015-04-16 12:10:01 +03:00