Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Created by Altaab Ansari
Created on Jan 28, 2026

Please add support for auto-incrementing numeric IDs. For example, if an ID starts at 1000001, the next created record should automatically use 1000002

What problem are you trying to solve?

Focus on the what and why of the need you have, not the how you'd like it solved.

MongoDB lacks native support for auto-incrementing numeric IDs, forcing applications to use custom counter logic, which increases complexity and maintenance overhead.

What would you like to see happen?

Describe the desired outcome or enhancement.

Provide native support for auto-incrementing numeric IDs with configurable starting values and guaranteed uniqueness, handled automatically by MongoDB during document creation.

Why is this important to you or your team?

Explain how the request adds value or solves a business need.

This would simplify application design, reduce custom logic, and ensure safe, consistent generation of sequential IDs required for business processes such as orders, invoices, and reporting.

What steps, if any, are you taking today to manage this problem?

Current Workaround:
We maintain a separate counters collection to track sequence values for each collection and use a custom Mongoose auto-increment plugin. This relies on transactions and session management to safely increment counters and generate formatted IDs (with prefix, padding, and suffix) before creating documents.

Limitation:
This approach adds significant complexity, requires additional infrastructure and transaction handling, and increases maintenance and concurrency risk compared to a native MongoDB solution.


  • Nikhilesh Singh
    Jan 28, 2026

    I am facing this issue as well resolve this

  • Kshitij Singh
    Jan 28, 2026

    I am facing this issue as well resolve this

  • Riya Vishwakarma
    Jan 28, 2026

    I am also facing the same issue, Kindly fix it asap!!!