Commit Graph

24 Commits

Author SHA1 Message Date
Laszlovl
0f640c7138 Make sure inverseOf relations are also populated during dynamic relational queries
Refs #6347
2016-07-04 15:07:37 +02:00
Carsten Brandt
a46e88dea5 fixed inverseof test assertation
fixed wrong test to actually test what it should.
current assertation is a duplicate.

thanks to @laszlovl for spotting it.

pr #8497
2016-07-04 13:41:02 +02:00
Carsten Brandt
8ba032d147 refactored database tests
- changed test class naming for easier copying and searching of classes
- made base tests abstract and made MySQL an equal citisen in the test
  hierarchie
- added missing db specific test classes
2016-06-20 19:26:43 +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
Carsten Brandt
37d2373911 added tests for #9047
1. verify it only affects composite primary key situation
2. add failing test for composite primary key situation with join
2016-04-22 16:39:06 +02:00
Carsten Brandt
fd68e6814e added failing test for #11088 2016-04-22 11:01:53 +02:00
Ivaylo Ushev
5921865459 Fixed: #11270 - Error when link record in one to many relation. (#11301)
Fixed: #11270 - Error when link record in one to many relation.
2016-04-08 10:36:38 +03: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
94571e2c23 improved tests for ActiveQuery::joinWith alias 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
nainoon
076329bfba add test for join with alias
close #8788
2016-02-12 12:26:34 +01:00
Alexander Makarov
615a29f04e More fixes for MSSQL tests 2015-12-09 03:07:32 +03:00
Alexander Makarov
8765cae71c Reverted #9656 because of BC break (reverted from commit 4a464afe9b) 2015-11-25 06:41:55 +03:00
Sam Mousa
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
Alexander Makarov
357bce51bb Tests for #9006 2015-07-30 19:25:52 +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
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
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
Klimov Paul
6d96d3cbee Fixed yii\db\BaseActiveRecord::updateCounters() fails for new record saved with counter attribute not set 2015-04-21 16:23:00 +03:00
Jan Was
5f099b3f8d Merge branch 'master' into 7374-inserting-ar-without-values 2015-04-21 09:49:46 +02:00
Alexander Makarov
6949992246 Simplified tests directory structure a bit 2015-04-16 12:10:01 +03:00