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

`Yiisoft\Db\Query\Query` class can be extended in each supported DBMS. E.g. we can have `Yiisoft\Db\Mssql\Query` which extends `Yiisoft\Db\Query\Query`. In this case `ActiveQuery` will not know about the extensions in `Yiisoft\Db\Mssql\Query`. ###...

type:enhancement

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

The magic `__get($name)` override in `BaseActiveRecord` is confusing, and its combination of private `_attributes` and `_related` array access and strange use of `$this->hasAttributes($name)` renders it inextensible. ``` public function __get($name)...

I think, will be better add method findByPk() and remove search without keys for findOne() and findAll().

type:enhancement

Create tryFind(), tryFindOne(), tryFindByPk() wrappers. Wich will generate not found exception, if element not found. It`s more simple to log errors. Example from documentation: http://www.yiiframework.com/doc-2.0/guide-db-active-record.html ``` // "id" and "email"...

type:docs

Related with yiisoft/db#729

status:ready for adoption

| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ✔️ | Breaks BC? | ✔️ | Fixed issues | [#725](https://github.com/yiisoft/db/issues/725)

### What steps will reproduce the problem? ActiveQuery::one() doesn't seem to limit records in SQL. ### What is the expected result? Queries created with ActiveQuery::one() should have a `LIMIT 1`...

### What steps will reproduce the problem? ```php $object = new ActiveRecordObject($mysqlDatabaseConnection); serialize($object); ``` ### What is the expected result? Serialize the object ### What do you get instead? Error...

I have two database connections. The main connection (`\Yii::$app->db`) is empty now. And the second which connected to a database with existed tables. Also I have an activeRecord model for...

type:enhancement