I am trying to map model attributes to database fields with different
names.

Example of regular CakePHP model:
User Model with attributes "id" and "firstname" would load the
appropriate values from same-named database fields "id" and
"firstname".

Example of my CakePHP mode:
User Model with aatributes "id" and "first_name" should load the
appropriate values from the fields "uid" and "firstname".

I know this is not perfect, but absolutely necessary because the new
and old application will use the existing database at the same time.
However, we do not want to continue using the old attribute names like
"uid" and "firstname".

I've tried playing around with the $_schema variable, but with no
luck :-(


Summary of this question: How to load a model attribute called X from
a database table field called Y?


Your help is much appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to