octabytes / FireO

Google Cloud Firestore modern and simplest convenient ORM package in Python. FireO is specifically designed for the Google's Firestore
https://fireo.octabyte.io
Apache License 2.0
250 stars 29 forks source link

List of Nested Models #103

Closed davidPalechor closed 3 years ago

davidPalechor commented 3 years ago

Hello FireO team!

I'm wondering if there is any support for list of Nested models. I'm looking forward to doing something like this.

{
  "defaults": [
    {
      "attr1": "something1",
      "attr2": "something2"
    },
    {
      "attr1": "something3",
      "attr2": "something4"
    }
  ]
}

Using a different model for attr1 and attr2

Is this possible?

Thanks!

AxeemHaider commented 3 years ago

There is related issue #96

Might your requirements fulfil with Map Field if none of field fullfil your requirements then you create your Custom Field

AxeemHaider commented 3 years ago

Check this comment FlexibleNestedModelField by monthero

And see if it solve your problem