Skip to content

Critical bug in MetaModel::save #894

@dmolineus

Description

@dmolineus

When a MetaModel item which is loaded with a subset of it's attributes is saved using the API all other attributes values will get lost when saving the item.

<?php

$item     = $metaModel->findById(5, array('visitors'));
$visitors = $item->get('visitors') + 1;

$item->set('visitors', $visitors);
$item->save(); // Now all other attributes when visitors get lost

Metadata

Metadata

Assignees

Labels

bugA bug! A bug! Fast, squish it!

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions