Skip to content

fix: include options parameter in createIndex method #794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

digorgonzola
Copy link

Problem: When defining custom index names in model settings, the connector was ignoring the specified name option and falling back to MongoDB's default naming convention (e.g., "archived_1" instead of "archived").

Root Cause: The createIndex() call was missing the options parameter, so custom index options including the name field were not being passed to MongoDB.

Solution: Updated the createIndex() call to include the index.options parameter:

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine (fails 1 test but this is unrelated)
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • Commit messages are following our guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant