Comments (4)
@laveolus and @brightgems and @Jibola, until this is addressed, have you found any temporary workaround to this? I also encountered same.
Currently, I have just leveraged the Pydantic BaseModel
class as my workaround for now. If it's unavoidable, I've settled for removing the Optional field usage.
from odmantic.
In v1.0.0, all optional fields are aliased to the (first) field type, see #379.
from odmantic.
@laveolus and @brightgems and @Jibola, until this is addressed, have you found any temporary workaround to this? I also encountered same.
from odmantic.
We are also plenty of Optional[] fields with different types, and this makes odmantic 1.0.0 pretty much unusable.
Anyone found a workaround for this? Thanks!!
from odmantic.
Related Issues (20)
- Embedded models have to be defined before any normal models that reference them HOT 4
- Question: how to mock/write propper unittests HOT 2
- Odmantic Does Not Add Pydantic Computed Fields to MongoDB HOT 2
- Aggregation support via the find method HOT 2
- Datetime not updating and not updating frequently
- Injected Context for Model Class not picked up
- Unexpected @field_validator behaviour
- ODMantic is incompatible with pydantic version 2.7.0 HOT 4
- Custom fields serialisation & deserialisation HOT 1
- Motor uses ThreadPoolExecutor, it drastically decreases a performance HOT 4
- `key_name` doesn't work when field is `id` HOT 2
- The "Custom field types" doc talks about a __bson__ method with an example that doesn't include it
- Field support exclud
- __bson__ serialization does not work when Optional / Union used with Custom Types
- Can't save a model with a field of type pydantic.AnyUrl
- Optional Embedded model and key_name not working HOT 6
- Using Model.model_construct breaks attr setters
- High Memory Usage when Iterating over cursor with many document
- AIOEngine的最佳实践是什么, HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odmantic.