|
How to map persistent properties to different columns |
PntDbClassDescriptor includes a getFieldMap method that returns the $this->fieldMap field if it is set. If you set this field from the initPropertyDescriptors method of the peanut class, fields should be mapped differently to database table columns. However, this feature has not yet been tested, it is likely that some of the older framework methods ignore the fieldmap. This will be resolved during the beta test.
If you make the above fieldMap to be different from the default one to one mapping, be aware that your queries for that type of peanuts may need to use the fieldmap in order to map field names to column names.
|
|