Tharos / LeanMapper

Lean Mapper is a tiny ORM based on powerful Dibi database abstraction library for PHP.
MIT License
87 stars 35 forks source link

Entity::set() m:passThru does not work for type changing passThru methods #93

Closed castamir closed 8 years ago

castamir commented 8 years ago

https://github.com/Tharos/LeanMapper/blob/develop/src/LeanMapper/Entity.php#L667-L670

/**
 * @property int $id
 * @property string $name m:passThru(|serialize)
 */
class Author extends LeanMapper\Entity
{
    public function serialize($name) {
        return strtolower(implode($name));
    }
}

$author = $repository->get(...);
$author->name = ['John Doe'];             // john doe