Files changed (1)
However, the approach above is not complete. While our `EmailAddress` object will shuttle the value through the `email` descriptor and into the `_email` mapped attribute, the class level `EmailAddress.email` attribute does not have the usual expression semantics usable with `Query`. To provide these, we instead use the `synonym()` function as follows:
The `email` attribute is now usable in the same way as any other mapped attribute, including filter expressions, get/set operations, etc.:
If the mapped class does not provide a property, the `synonym()` construct will create a default getter/setter object automatically.