update query overwrites id with single value
Updates follow the sql update query syntax, so in your example the queries executed are:

``` sql
update ornaments set id=%s, likes=%s
```

What you want is:

``` sql
update ornametns set likes=%s where id = %s
```

So:

``` python
for id, like in zip(ids, likes):
    o = Ornaments.update(likes=like).where(Ornaments.id == id)
    o.execute()
```

Please let me know if this fixes the issue!
 Yep, thanks.

I have the following models, mostly generated from pwiz. I'm using peewee 2.0.3 on linux with mysql.

```
class Users(BaseModel):
    """The users database model."""
    fbid = BigIntegerField()
    fbname = CharField()
    lastsession = CharField()
    playedts = IntegerField()

    class Meta:
        db_table = 'users'

class Ornaments(BaseModel):
     """The ornaments database model."""
     dedicatedto = CharField()
     likes = IntegerField()
     message = CharField()
     userid = ForeignKeyField(Users, db_column='fbid')
     x = IntegerField()
     y = IntegerField()
```

I have the following code:

```
    print ids, likes
    assert(len(likes) == len(ids))
    with database.transaction():
        for id, like in zip(ids, likes):
            print id, like
            o = Ornaments.update(id=id, likes=like)
            o.execute()
    print len(likes), 'records updated at', datetime.now()
```

which outputs:

```
[1, 2, 3] [0, 0, 0]
1 0
2 0
3 0
3 records updated.
[3, 3, 3] [0]
```

and then fails on the following assert because the ids and likes lists aren't parallel. I don't understand why the id is getting updated with the constant 3 instead of the 1,2,3 sequence indicated by the print output?

Thanks!
