Skip to content

LearnAllTheNodes/episode00012

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learn All The Nodes Episode 12

Unique records in Mongoose

View the episode

Databases can have repeat data in them, but there are some pretty obvious cases where we don’t want 2 different entries to have the same values. (Here’s looking at you, user authentication). If our users log in with their email address, then we certainly don’t want to have more than 1 user record having the same email address.

So how do we enforce that with Mongoose?

In this episode we'll see how to ensure uniqueness of values in our MongoDB records.

About

Unique records in Mongoose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published