Azure / Azure/cosmos-explorer

Mongo ID being prepended with `.`

Open
#948 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
131
Forks
67
Avg merge
3d 13h
Merged PRs (30d)
10

Description

You can repro in the create Collection pane in the Azure Portal.

1. Create a Mongo API collection and specify some partition key with a / (for example /_id or /address/zipcode)

2. After creation, look at the partition key for this collection. It has a . prefixed to the beginning of it.

Uploaded Image

3. As a result, Inserts will not work in the Portal, even if you set a value for _id. This makes me think that the partition key is in fact ._id rather than _id

Uploaded Image

Is this a bug? Would it be better for Mongo API to just error in the event where a user enters a partition key with a /?

Let me know if you need additional info.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue in the Azure Portal create Collection pane using a Mongo API collection and a partition key such as /_id or /address/zipcode. No source file or test is named in the report; trace the collection-creation UI and verify that the partition key is preserved correctly or that the UI rejects unsupported input, then confirm inserts work in the Portal.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, mongodb, typescript
Domain
cloud, databases, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.