active-record
active-record copied to clipboard
Active Record database abstraction layer
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ✔️ | Breaks BC? | ❌
### What steps will reproduce the problem? ``` $query = ArClass::find(); $query->addSelect('extraField'); $item = $query->one(); ``` ### What is the expected result? `$item` has all default fields + 1 `extraField`,...
The latest updates from several DB such as MySQL, Oracle, PostgreSQL are all supporting JSON data type with basic operations: create, update, index, validate. Should we implement a support at...
*@rustamwin commented on Oct 9, 2018, 10:23 AM UTC:* *This issue was moved by [samdark](https://github.com/samdark) from [yiisoft/yii-core#39](https://github.com/yiisoft/yii-core/issues/39).*
Sometimes you want to get all records from table (for example if it is a dictionary). Each model has findAll($condition) method, but you can call it without condition. I suggest...
Docs for `\yii\db\BaseActiveRecord::save()` ``` @return boolean whether the saving succeeded (i.e. no validation errors occurred) ``` As far as I can tell there are three ways that it can return...
### What steps will reproduce the problem? ```php $query = Product::find()->where(['id' => 1]); $query2 = Product::find()->where(['id' => 2]); $query-> union($query2); $provider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [...
Required query ``` SELECT "documents".*,"dup".* FROM "documents" LEFT JOIN "documents" "dup" ON ("documents"."filehash" = "dup"."filehash" AND "documents"."company_id" = "dup"."company_id" AND "documents"."id" != "dup"."id" ) ``` Try to define a relation...
Currently ActiveDataProvider takes several arguments: query, sort, pagination and then inside function prepareModels() it builds final query and executes it: https://github.com/yiisoft/yii2/blob/master/framework/data/ActiveDataProvider.php#L99 After that I want to get that final query....
If I understand correctly, here it is possible to leave wishes to the third version of the framework? I very much need possibility to register the getter or the setter...