It is possible to add a user defined field to a map/entity that does not exist in the table database but is processed by the extract() method and any registered converters?
Example:
I have a location entity that I wish to add a service_date field too. This field is not in the database. Its value is calculated based on other field values:
Location (entity):
- I add a custom getter called getServiceDate() that returns a timestamp after performing calculations based on other entity fields.
LocationMap (map):
- initialize()
- call $this->addField('service_date', 'timestamp');
- getSelectFields()
- call unset($fields['service_date']); so the field is not used in database queries.
Outcome:
- If I call $entity->extract(), the custom getter is not called.