active-record icon indicating copy to clipboard operation
active-record copied to clipboard

Active Record database abstraction layer

Results 86 active-record issues
Sort by recently updated
recently updated
newest added

The behavior of `link()` doesn't feel intuitive and in some cases even faulty to me. Consider I have models A, B and C. Table for model A looks like this:...

Есть 3 таблицы: Основные: TableA: id_a, data TableB: id_b,data Таблица связей (viaTable): TableC: id_a, id_b, type метод link() позволяет создать ссылку по типу: $modelA->link('relAB', $modelB, ['type' => 1]); $modelA->link('relAB', $modelB,...

*@SamMousa commented on Oct 25, 2018, 10:12 AM UTC:* Currently `yii\db\ActiveQuery` operates in 2 contexts (this is documented in the PHPDoc): * Normal * Relational This is a violation of...

type:enhancement
status:under discussion

There are cases when `ActiveRecord` instances should be used in `readonly` mode. For example, `readonly` tables or views (virtual tables) and views for rendering responses. For these cases `ReadOnlyActiveRecordInterface` interface...

status:under discussion

| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ✔️ | Breaks BC? | ❌ | Fixed issues | #362

status:code review

See https://github.com/yiisoft/docs/blob/master/010-code-style.md#names For example: `ActiveQueryInterface::getARInstance()` → `ActiveQueryInterface::getArInstance()` or `ActiveQueryInterface::getARInstance()` → `ActiveQueryInterface::getActiveRecordInstance()`

| Q | A | ------------- | --- | Is bugfix? | ✔️/❌ | New feature? | ❌ | Breaks BC? | ✔️ | Fixed issues | -

status:under discussion

Currently AR supports `scalar` to `array` relations: `$this->hasMany(Item::class, ['id' => 'item_ids'])` where `id` is `integer` column and `item_ids` is `integer array` column But AR does not support `array` to `scalar`...

type:feature

### Allow processing events - After read - Before insert - After insert - Before update - After update - Before save (before insert or update) - After save (after...

type:enhancement

```php interface RepositoryInterface { public static function find(array|string $condition = []): ActiveQueryInterface; public static function findBySql(string $sql, array $params = []): ActiveQueryInterface; public static function findOne(array|string $condition = []): ActiveRecordInterface|null;...