# Zend-db call RowGateway::save can not update only modified fields

**URL:** <https://discourse.laminas.dev/t/zend-db-call-rowgateway-save-can-not-update-only-modified-fields/552>\
**Category:** Components & MVC\
**Tags:** zend-db\
**Created:** [April 4, 2018, 4:00am UTC](https://discourse.laminas.dev/t/zend-db-call-rowgateway-save-can-not-update-only-modified-fields/552 "2018-04-04T04:00:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moln](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/moln/32/324_2.png) [@Moln](https://discourse.laminas.dev/u/Moln)\
**Post date:** [April 4, 2018, 4:00am UTC](https://discourse.laminas.dev/t/zend-db-call-rowgateway-save-can-not-update-only-modified-fields/552/1 "2018-04-04T04:00:37Z")

</div>

Why `RowGateway` removed update only modified fields feature in zend-db.

And what’s a good solution in `zend-db`, when I just want to update the modified fields.

### Code to reproduce the issue

```php
$row; //Get exists row;
$row->age = 13;
$row->save();

```

#### In ZF1

Will push `"age"` to `modifiedFields`

Execute sql:

```auto
update table_name set age=13 where id=1;

```

#### In zend-db

There is no record modified fields.

Execute sql:

```php
update table_name set age=13, username="xxx", create_time="xxxx" where id=1;

```

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [April 4, 2018, 5:44am UTC](https://discourse.laminas.dev/t/zend-db-call-rowgateway-save-can-not-update-only-modified-fields/552/2 "2018-04-04T05:44:58Z")

</div>

> [@Moln](#):
>
> Why RowGateway removed update only modified fields feature in zend-db.

Who knows. That’s just too long ago.

> [@Moln](#):
>
> There is no record modified fields.

This is a feature request and can be implemented as “[RowGateway Feature](https://github.com/zendframework/zend-db/tree/master/src/RowGateway/Feature)”.

A pull request with unit tests is always a help! 😃
