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
249 stars 29 forks source link

Fix ListField(<ItemField>) for Union and Remove #197

Closed ADR-007 closed 1 year ago

ADR-007 commented 1 year ago
ADR-007 commented 1 year ago

Btw. why do we have if self.model_cls._meta.to_lowercase: in Field and MapField (not just in TextField)? Does anybody really use it? What is the use-case?

AxeemHaider commented 1 year ago

This is just because Firestore is case sensitive and I just provide and extra option to make text lowercase. So, you can easily find by text when you search. It's ok if you removed it from ListField I think no one is using it in ListField But I think it's good to have in TextField

ADR-007 commented 1 year ago

This is just because Firestore is case sensitive and I just provide and extra option to make text lowercase. So, you can easily find by text when you search. It's ok if you removed it from ListField I think no one is using it in ListField But I think it's good to have in TextField

It still works in ListField. The logic is in Field class. I just removed the code duplication.

But I would expect to have this logic in TextField only.

AxeemHaider commented 1 year ago

Yes, I think it should be only in TextField because lowercase property is related to string