Closed milanmitrovic closed 11 months ago
Hi! I don't work with Firestore anymore, and I am unsure if I will have time for this...
In general, you need to add a new FieldResolver
to add support for the new type.
Something like this:
class CustomAnnotationResolver(AnnotationResolver):
resolvers = [*AnnotationResolver.resolvers, MyCustomTypeFieldResolver]
class MyModel(TypedModel):
class Meta:
annotation_resolver_cls = CustomAnnotationResolver
my_field: MyCustomType
You can find some examples of the resolvers here: src/fireo/typedmodels/resolver.py
Thank you. I made it work along those lines.
I noticed that there is no reference field support for TypedModels. Is there a plan to add this functionality? Should I use some kind of workaround?