You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to define field_order for classes which inherit from AvroBaseModel, this can cause some weird side-effects. Field order seems to work like a private attribute, since it is created when running .avro_schema(), and this field_order created by running this method overwrites the field_order which is explicitly defined. This can also have the effect that if one pytest checks that each schema inheriting from AvroBaseModel has a complete (user defined) field order, and then a subsequent test checks that .avro_schema() successfully generates the schema, then these tests will catch the error if run in this order, but not if run in a different order.
It was also found that on >= 0.63.2, sometimes editing the field order of a child class could affect the field order of instances of the parent class.
The text was updated successfully, but these errors were encountered:
Describe the bug
When trying to define field_order for classes which inherit from AvroBaseModel, this can cause some weird side-effects. Field order seems to work like a private attribute, since it is created when running .avro_schema(), and this field_order created by running this method overwrites the field_order which is explicitly defined. This can also have the effect that if one pytest checks that each schema inheriting from AvroBaseModel has a complete (user defined) field order, and then a subsequent test checks that .avro_schema() successfully generates the schema, then these tests will catch the error if run in this order, but not if run in a different order.
It was also found that on >= 0.63.2, sometimes editing the field order of a child class could affect the field order of instances of the parent class.
The text was updated successfully, but these errors were encountered: