[eluser]lsemel[/eluser]
I'd like to transparently transform fields when a DMZ row is loaded or saved. Is there a way to do this? Examples:
1) Whenever I load a row, I want to transparently the mysql formatted date into a unixtime on a particular field, and whenever I save the row, I want to change it back, transparently.
2) Whenever I save a row, I want a certain field automatically changed to lowercase before saving.
3) Whenever I load a row containing the fields 'name' and 'id', I want to create a new field path' which is $name.'/'.$id. I don't want this field to be saved if I save the row, since it doesn't actually exist in the database. I know I can easily create a method that does this, but why should the people using my views have to know they need to use $mymodel->path() when all the other fields are like $mymodel->name, with no parenthesis?
I feel like either or all of these could be done with DMZ validators, but not sure exactly how.