From b3c1ba6dccb0ba9aa55b2b43eea6f00a3684e1c7 Mon Sep 17 00:00:00 2001 From: shirodune <182082960+shirodune@users.noreply.github.com> Date: Sat, 18 Jan 2025 17:38:18 +0800 Subject: [PATCH] Update links in part3c.md --- src/content/3/en/part3c.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/3/en/part3c.md b/src/content/3/en/part3c.md index cc5546248b..8a4562c246 100644 --- a/src/content/3/en/part3c.md +++ b/src/content/3/en/part3c.md @@ -205,7 +205,7 @@ The data is now stored in the right database. The view also offers the create ### Schema -After establishing the connection to the database, we define the [schema](http://mongoosejs.com/docs/guide.html) for a note and the matching [model](http://mongoosejs.com/docs/models.html): +After establishing the connection to the database, we define the [schema](https://mongoosejs.com/docs/guide.html#schemas) for a note and the matching [model](https://mongoosejs.com/docs/models.html): ```js const noteSchema = new mongoose.Schema({ @@ -216,9 +216,9 @@ const noteSchema = new mongoose.Schema({ const Note = mongoose.model('Note', noteSchema) ``` -First, we define the [schema](http://mongoosejs.com/docs/guide.html) of a note that is stored in the _noteSchema_ variable. The schema tells Mongoose how the note objects are to be stored in the database. +First, we define the [schema](https://mongoosejs.com/docs/guide.html#schemas) of a note that is stored in the _noteSchema_ variable. The schema tells Mongoose how the note objects are to be stored in the database. -In the _Note_ model definition, the first "Note" parameter is the singular name of the model. The name of the collection will be the lowercase plural notes, because the [Mongoose convention](http://mongoosejs.com/docs/models.html) is to automatically name collections as the plural (e.g. notes) when the schema refers to them in the singular (e.g. Note). +In the _Note_ model definition, the first "Note" parameter is the singular name of the model. The name of the collection will be the lowercase plural notes, because the [Mongoose convention](https://mongoosejs.com/docs/models.html#compiling) is to automatically name collections as the plural (e.g. notes) when the schema refers to them in the singular (e.g. Note). Document databases like Mongo are schemaless, meaning that the database itself does not care about the structure of the data that is stored in the database. It is possible to store documents with completely different fields in the same collection. @@ -226,7 +226,7 @@ The idea behind Mongoose is that the data stored in the database is given a s ### Creating and saving objects -Next, the application creates a new note object with the help of the Note [model](http://mongoosejs.com/docs/models.html): +Next, the application creates a new note object with the help of the Note [model](https://mongoosejs.com/docs/models.html): ```js const note = new Note({