Coder Social home page Coder Social logo

Comments (4)

Olegt0rr avatar Olegt0rr commented on August 31, 2024

Solution to hide this description described in #75 (comment)
But I'm still suggesting to remove current description as I wrote above

from odmantic.

Olegt0rr avatar Olegt0rr commented on August 31, 2024

Bad news, it's not a solution.

id: ObjectId = Field(primary_field=True, description='My ID') is overwrited by MongoDB ObjectId string description :(

from odmantic.

adeelsohailahmed avatar adeelsohailahmed commented on August 31, 2024

Bad news, it's not a solution.

My solution was specific to that issue. The user wanted to use their own strings for id field for their model instead of letting ODMantic generate id itself.

from odmantic.

art049 avatar art049 commented on August 31, 2024

Replacing the default example is totally good to me.
We can as well remove the default description.

What kind of database and what kind of identifier generation are used to store the data is not a client's business.

Unfortunately, it's a bit linked. Since we perform ObjectId validation, passing an invalid id (like a non hex string) will raise a validation error.

We can still remove the description since it's overriding everything right now though.

from odmantic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.