Automattic / Automattic/mongoose

SchemaType "Set"

Open
#12,916 3 comments 0 reactions 0 assignees View on GitHub
enhancement new feature
Dominant language
JavaScript
Stars
27.5k
Forks
4k
Avg merge
2d 7h
Merged PRs (30d)
35

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested

### 🚀 Feature Proposal

ECMAScript type "Set" can be useful in schema

### Motivation

there are many subdocument schema which should be unique within an individual document.

### Example
```
const abcSchema= new Schema({
name:{type:String, unique: true},
keywords: Set(String)
})
```

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by tracing how Mongoose schema types are defined and persisted to MongoDB, then compare the requested Set(String) declaration with existing schema behavior. Done should mean Set is supported in schemas and its uniqueness within an individual document works as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.