Thursday, April 30, 2009

Database column level processing

I need a way to process specific database columns when they are read
from or saved to the database.
Specifically, we need to format dates to a local formatting when read
and format them to database format when saved.

The only way I can see is to hook in to beforeSave and afterFind but
those hooks act on complex data structures (I have looked at Nik
Chankov's date formatter but it fails for all but the simplest
queries).

What would be ideal is to be able to hook in to just before/after the
sql query and process the data there.

Any suggestions?

TIA

Mal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: