lox / pheasant

A lightweight data mapper designed to take advantage of PHP 5.3+
http://getpheasant.com
MIT License
101 stars 21 forks source link

DomainObject::load does not use magic setters #164

Closed jorisleker closed 6 years ago

jorisleker commented 6 years ago

When using DomainObject::load with an array containing keys other then those supported by the DomainObject, this will result in a SQL error on save. This is because every key/val combination is added to the private _data array without checking it against the Schema. Easy way to circumvent would be to use $this->__set() on each key/val combination in the array passed to load()