02ed808056
New methods: BaseActiveRecord::loadRelations() and BaseActiveRecord::loadRelationsFor().
2023-10-13 13:22:48 +03:00
8532622d7b
Fix #19911 : Resolved inconsistency in ActiveRecord::getAttributeLabel() with regard of overriding in primary model labels for attributes of related model in favor of allowing such overriding for all levels of relation nesting
2023-08-26 07:06:41 +04:00
73f57fdcb0
Fix #19872 : Fixed the definition of dirty attributes in AR properties for a non-associative array in case of changing the order of elements
2023-08-18 15:19:24 +04:00
79c83ba7db
Fix #9899 : Fix caching a MSSQL query with BLOB data type
2023-07-24 10:03:18 +03:00
76d6345e85
Add test resetSequence() for SQLite. ( #19895 )
...
* Add test `resetSequence()`.
* add more test.
2023-07-17 09:53:21 +02:00
4352b8744b
Fix #19884 : Added support Enums in Query Builder
2023-07-10 18:07:10 +03:00
b9e5a87f54
Fix tests, clean workflows, separate db tests, use codecov for code coverage ( #19883 )
2023-07-10 07:12:07 +03:00
6e7d0fbff4
Fix #19816 : Explicitly pass $fallbackToMaster as true to getSlavePdo() to ensure it is not affected by child class with changed defaults
2023-05-04 15:36:33 +03:00
948029f583
Fix #19693 : Fix db/Command not caching NULL result with scalar fetchMode
2022-12-04 19:55:12 +03:00
0b4d5aaafa
Fix #19520 : Fix for TIMESTAMP & ROWVERSION columns in MSSQL insert query
2022-11-13 21:26:49 +03:00
7d8507dea8
Fix eager loading of nested one-to-many relations ( #19585 )
...
* Update ActiveRelationTrait.php
fix #19507
* update structure-applications.md wiki links (#19597 )
* update structure-models.md wiki links (#19598 )
* Update structure-views.md wiki links (#19600 )
* update structure-filters.md links (#19601 )
* Added nested via relations
* Added nested via relations eager loading test
* Update framework/db/ActiveRelationTrait.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/data/ar/Customer.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/data/ar/Customer.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Update tests/framework/db/ActiveRecordTest.php
Co-authored-by: Bizley <pawel@positive.codes>
* Fix #19507 : Fix eager loading of nested relations
Co-authored-by: Ihor Sychevskyi <arhell333@gmail.com>
Co-authored-by: Bizley <pawel@positive.codes>
2022-10-04 15:55:53 +06:00
2808e8d814
Fix #15500 : Fix saving empty records to MySQL
2022-08-29 10:43:00 +03:00
161526cd41
HTTPS everywhere ( #19503 )
2022-08-03 12:32:18 +03:00
adadbefe88
Fix #19469 : Fix a virtual relation not working because of new isset checks in \yii\db\ActiveRelationTrait
2022-07-15 23:52:39 +03:00
98e93083ed
Update DeadLockTest::testDeadlockException() ( #19385 )
2022-05-22 12:52:56 +03:00
4628b91e73
Fix types ( #19332 )
...
* Migration::upsert() returns void
* Unneeded `@property` tags
* Add missing `null` param/return types
* Null types for db\Query + db\ActiveQuery
* Fixed testSelect
2022-03-30 18:40:10 +02:00
730f0e56b5
Fix #18821 : Allow yii\db\ExpressionInterface as column in yii\db\conditions\InBuilder
2022-02-08 16:51:38 +03:00
6a36fa82c7
Fix #19047 , fix #19118 : Fix deprecated preg_match() passing null parameters #2 in db\mysql\Schema.php
2022-02-07 01:29:03 +03:00
67ea4cf968
Fix #19148 : Fix undefined array key errors in yii\db\ActiveRelationTrait
2022-01-19 01:47:07 +03:00
4a8c72f0c4
Normalize todos ( #19045 )
2021-11-26 00:45:09 +03:00
c8d027f649
Fix #18993 : Load defaults by attributes() in yii\db\ActiveRecord::loadDefaultValues()
2021-11-12 00:25:08 +03:00
17742cb146
don't convert int to string if db type of column is numeric ( #18741 )
...
* write adequate test for issue #14663
* don't convert int to string if db type of column is numeric (#14663 )
* fix bigint schema test for MySql >8.0.17 (#14663 )
* Update CHANGELOG.md
* Update CHANGELOG.md
* update phpdoc [ci skip] (#14663 )
* refactoring test case to make it clearer [ci skip] (#14663 )
* check `int unsigned` in `QueryBuilderTest::testInsertInteger()` (#14663 )
* Update Upgrade.md (#14663 )
* fix `int unsigned` schema test for MySql >8.0.17 (#14663 )
* fix `int unsigned` schema test for MySql <5.7 (#14663 )
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Bizley <pawel@positive.codes>
2021-07-06 20:49:01 +02:00
87849c640f
Fix #18737 : Fix SchemaTest::testColumnSchema() for MySql <5.7
2021-07-01 20:36:17 +03:00
7966fe47e6
Scrutinizer fixes ( #18685 )
...
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/filters/AccessRule.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/helpers/BaseFileHelper.php?selectedLabels%5B0%5D=2&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Application.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Module.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/MultipartFormDataParser.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/web/Session.php?selectedLabels%5B0%5D=7&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/base/Controller.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* Added vardocs, and small refactor
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/conditions/InConditionBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/Connection.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/db/mssql/QueryBuilder.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/log/Logger.php?selectedLabels%5B0%5D=6&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/BaseMigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* Adding space between type
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/CacheController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/FixtureController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* https://scrutinizer-ci.com/g/yiisoft/yii2/issues/master/files/framework/console/controllers/MigrateController.php?selectedLabels%5B0%5D=18&selectedSeverities%5B0%5D=10&selectedSeverities%5B1%5D=5&orderField=path&order=asc&honorSelectedPaths=0
* Update framework/console/controllers/CacheController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/CacheController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/FixtureController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/FixtureController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/FixtureController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/FixtureController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/FixtureController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
* Update framework/console/controllers/FixtureController.php
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-05-31 21:07:36 +03:00
4fba562cd0
New attemp
2021-04-26 19:24:14 +03:00
9367af4b15
Fix for issue #18604
2021-04-25 20:19:14 +03:00
395dc70468
Merge branch 'master' into fix/db-pgsql-raw-sql-params
2021-04-01 23:49:53 +03:00
335385d7ba
Db pgsql getRawSql params replace fix
2021-04-01 19:37:50 +03:00
10bb71a822
Fix #17203 : Fix yii\db\Connection to persist customized queryBuilder configuration after the close() → open() cycle
2021-04-01 01:10:16 +03:00
42e8aa4ea5
Fix #18325 : Fix yii\db\pgsql\Schema to respect non-default PgSQL schema name for data types
...
Co-authored-by: SilverFire - Dmitry Naumenko <d.naumenko.a@gmail.com>
2021-04-01 00:52:02 +03:00
64ecbf10b1
Fix for issue #18526
...
DbCache doesn't working using MSSQL/SqlServer
2021-03-15 22:47:54 +03:00
54f25c4b04
Fix #17174 : Fix yii\db\BaseActiveRecord::unlink() to not ignore on conditions in via relations
2021-03-14 19:04:07 +03:00
6dad27d4a1
Reversed #18499 ( #18546 )
2021-03-04 12:53:11 +03:00
50831e6f08
Travis leftovers cleanup
2021-03-03 02:21:39 +03:00
14f1138441
Correct #18499
2021-03-01 23:02:28 +03:00
d1037db68d
Fix #18499 : When using yii\db\Query::all() and yii\db\Query::$indexBy, the yii\db\Query::$indexBy is auto inserted into yii\db\Query::$select - the same as in yii\db\Query::column()
...
Co-authored-by: Bizley <pawel@positive.codes>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2021-02-23 18:44:39 +03:00
ad6daecdfe
Add test for issue #14663
2021-02-08 22:31:41 +03:00
9883b78214
Fix #18448 : Fix issues in queries and tests for older MSSQL versions
2020-12-24 17:37:07 +03:00
0571e806b9
Fix #18447 : Do not use getLastInsertID to get PK from insert query to lower collision probability for concurrent inserts
2020-12-24 14:04:01 +03:00
ff0fd9a9ea
Fix #16492 : Fix eager loading Active Record relations when relation key is a subject to a type-casting behavior
2020-12-15 22:56:24 +03:00
7c7c7148f6
Fix #18287 : Fix the OUTPUT got SQL syntax error if the column name is MSSQL keyword e.g key
2020-12-09 00:09:11 +03:00
cafe8e315c
Fix #18406 : Fix PDO exception when committing or rolling back an autocommitted transaction in PHP 8
2020-11-26 23:54:56 +03:00
8784331022
Fix #18385 : Add ci-oracle and fix tests
...
* Add github action for testing oci8 Oracle.
* Fix CommandTest::testQueryCache.
* Fix tests CommandTest::testBindParamsNonWhere.
* Fix test CommandTest::testInsert.
* Fix test CommanTest::testInsertExpression.
* Fix test CommandTest::testInsertSelectAlias.
* Fix test CommandTest::testBindParamValue.
* Fix tests CommandTest::testBatchInsertDataTypesLocale.
* Fix test CommandTest::testNoTablenameReplacement.
* Fix test CommandTest::testCreateTable.
* Fix test CommandTest::testsInsertQueryAsColumnValue.
* Fix tests CommandTest::testAlterTable.
* Fix test CommandTest::testCreateView.
* Fix test CommandTest::testTransaction.
* Fix test ConnectionTest::testTransactionShortcutCorrect.
* Fix test ConnectionTest::testTransactionShortcutCustom.
* Fix test ConnectionTest::testEnableQueryLog.
* Fix test QueryBuilder::testAddDropDefaultValue.
* Fix test QueryTest::testUnion.
* Fix test QueryTest::testExpressionInFrom.
* Fix test SchemaTest::testFindUniqueIndexes.
* Fix test QueryBuilderTest::testGetColumnType.
* Fix test ActiveRecordTest::testFind.
* Fix test ExistValidatorTest::testExpresionInAttributeColumnName.
* Fix test UniqueValidatorTest::testExpressionInAttributeColumnName.
* Fix ActiveRecordTest testCastValues(), testDefaultValues.
* Fix test UniqueValidatorTest::testValidateAttributeDefault.
* Fix test UniqueValidatorTest::testValidateEmptyAttributeInStringField.
* Fix test UniqueValidatorTest::testValidateEmptyAttributeInIntField.
* Fix test ActiveRecordTest::testBit.
* Fix test ActiveRecordTest::testBooleanAttribute.
* Fix test ActiveRecordTest::testJoinWithAlias.
* Fix test SchemaTest::testColumnSchema.
* Fix test CommandTest:: testBatchInsertSQL.
* Skip CommandTest::testColumnCase.
* Fix test ConnectionTest::testQuoteValue.
* Should be fixed tests conditionsProvider in QueryBuilderTest.
* Fix ActiveRecordTest.php
* Fix test UniqueValidatorTest.
* Fix test QueryBuilderTest::testUpsert.
* Skip SchemaTest::testCompositeFK.
2020-11-23 23:12:01 +03:00
ed1c087784
Fix #18317 : Additional PHP 8 compatibility fixes
...
Co-authored-by: Bizley <pawel@positive.codes>
2020-10-23 12:42:44 +03:00
7a50da5cf8
Fix #18287 : Fix for OUTPUT INSERTED and computed columns. Added flag to computed values in table schema
2020-10-04 21:44:18 +03:00
9790ea3a35
Add tests to ensure ActiveQuery is using DB connection set by model ( #18286 )
2020-09-17 20:07:32 +03:00
e5e80ac5ec
Fix testGetColumType for PostgreSQL ( #18279 )
2020-09-11 19:23:00 +03:00
5558ee793b
Fix #18040 , fix #15265 , fix #18232 database issues ( #18225 )
...
- Bug #18040 : Display width specification for integer data types was deprecated in MySQL 8.0.19
- Bug #15265 : PostgreSQL > 10.0 is not pass tests with default value of timestamp CURRENT_TIMESTAMP
- Bug #18232 : Fail tests pgsql v-10.14, v-11.9, v-12-latest
2020-09-10 20:36:04 +03:00
4b2af4d2a4
Bug #13973 : Correct alterColumn for MSSQL & drop constraints before drop column
...
Fixing #11158 and #13973
2020-09-08 12:50:32 +03:00
09dc9b70f8
Fix #18066 : Fixed yii\db\Query::create() wasn't using all info from withQuery()
2020-09-07 15:45:57 +03:00