# Generated properties
As well as the data retrieved from the data source, Lodata can add properties to an entity that are generated at runtime.
Lodata provides the \Flat3\Lodata\GeneratedProperty
class which must be extended and provided with an invoke()
method
which will receive the \Flat3\Lodata\Entity
currently being generated.
The generated property must return a PHP type or an instance of a primitive type. The resulting instance of the custom generated property is added to the entity type.
This example creates and attaches a generated property named eman
with the type Edm.String
on the person
entity type.
This property will be represented in the metadata alongside the other declared properties.