Is there a way to do type mapping between database and model

As in the post title: Is there a way to easily map PHP types to database types (MySQL in my case)?

I have a table with a lot of columns TINYINT(1) which hold 0 / 1 values. In my model I wouild like them to be mapped to TRUE / FALSE on PHP side but when saving to database they should be converted back to 0 / 1.