Add serialization for Enum and CombinedExpression.
Review Request #12043 — Created Feb. 4, 2022 and submitted
This enhances the serialization support to represent
Enum
values and
CombinedExpression
instances.
Enum
s are stored as a dictionary with metadata needed to resolve the
enum.
CombinedExpression
is used only in generated Python code. It's turned
into a<left> <op> <right>
expression in code. Support is partially
implemented for versions prior to Django 2.0, but not tested. This
feature is really only used in a way that matters for evolutions in 2.0
or higher, which is important, because prior versions don't support
object deconstruction, meaning they can't be serialized without explicit
serializers written for them.
Tested with upcoming changes that use these types.