kla/php-activerecord — pull request #242 by leightonshank (2012-11-08 18:57:41+00:00)
Title: Add custom boolean value casting

I ran into an issue where the default PHP casting of false boolean values (PHP casts false to an empty string) didn't work with a PostgreSQL database which doesn't accept an empty string for a boolean value.

To get around this, I added a new BOOLEAN column type, updated the `cast()` method in the `Column` class to delegate to the `Connection` class for converting a boolean to string values. By default it still uses the standard PHP casting (i.e. `(string)$value`), but can be overridden in an adapter connection class for custom handling of boolean conversion.