Skip to content

Releases: Smoren/yii2-query-relation-manager

Docs fixed

29 Aug 04:48
Compare
Choose a tag to compare
1.3.1

readme fixed

Абстрактные компоненты вынесены в отдельный репозиторий

28 Aug 17:21
Compare
Choose a tag to compare
1.3.0

Абстрактные компоненты вынесены в отдельный репозиторий

Добавлен QueryRelationDataProvider

25 Aug 09:32
Compare
Choose a tag to compare
// Используем QueryRelationDataProvider для пагинации
$qrm = QueryRelationManager::select(City::class, 'c')
    ->withMultiple('addresses', Address::class, 'a', 'c', 'city_id', 'id');

$dataProvider = new QueryRelationDataProvider([
    'queryRelationManager' => $qrm,
    'pagination' => [
        'pageSize' => 2,
        'page' => 0,
    ],
]);

print_r($dataProvider->getModels());
/*Array
(
    [0] => Array
        (
            [id] => 1
            [name] => Moscow
            [addresses] => Array
                (
                    [0] => Array
                        (
                            [id] => 2
                            [city_id] => 1
                            [name] => Schipok st., 1
                        )

                    [1] => Array
                        (
                            [id] => 1
                            [city_id] => 1
                            [name] => Tverskaya st., 7
                        )

                )

        )

    [1] => Array
        (
            [id] => 2
            [name] => St. Petersburg
            [addresses] => Array
                (
                    [0] => Array
                        (
                            [id] => 4
                            [city_id] => 2
                            [name] => Galernaya st., 3
                        )

                    [1] => Array
                        (
                            [id] => 3
                            [city_id] => 2
                            [name] => Mayakovskogo st., 12
                        )

                )

        )

)*/

Добавлен функционал по автоподстановке дефолтных значений полей, если они оказываются пустыми

20 Aug 16:17
Compare
Choose a tag to compare

Добавлен функционал по автоподстановке дефолтных значений полей, если они оказываются пустыми

  • Для связей типа single: NULL
  • Для связей типа multiple: []

Fixed bug with table schema

22 Jun 12:54
Compare
Choose a tag to compare
1.0.5

fix bug with schema attributes

Docs updated

03 Jan 16:31
Compare
Choose a tag to compare
1.0.4

docs upd

Readme added

03 Jan 15:35
Compare
Choose a tag to compare
1.0.3

readme upd

Release

03 Jan 10:54
Compare
Choose a tag to compare
1.0.2

use custom db connection in all()

Documented code version

02 Jan 17:16
Compare
Choose a tag to compare
1.0.1

documenting code

First release

24 Dec 09:41
Compare
Choose a tag to compare
1.0.0

upd