FireO
FireO copied to clipboard
no support for nesting models inside list or map fields
support for the following types of models (pseudo code):
class User(Address):
street = TextField()
city = TextFielder()
...
class User(Model):
name = TextField()
addresses = ListField(Address())
or
addresses = MapField(Address())
#key of map would of course be string, value would be address model.
Hi @SaadAttieh ,
I tried this way and it worked for me, see if it is what you want:
class UserAddress(Model):
street = TextField()
city = TextField()
...
class User(Model):
name = TextField()
addresses = MapField(UserAddress())
I added support in this PR. It allows any number of levels of nested objects/lists
@ADR-007 @AxeemHaider I believe nesting a model as a value of a map is still not achieveable, do you confirm?
example: Mapfield(TextField, NestedModelField(SomeModel))
Hi @aelamran , you are right. I didn't implement it for MapField, only for ListField (as far as I remember)