From c05c80e631e6356c0a356d1f44325bbd7dfc7ac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Poullain?= Date: Mon, 18 Apr 2022 19:27:27 +0200 Subject: [PATCH] [Docs] Add note on the use of TypeORM --- .../tutorials/simple-todo-list/3-the-todo-model.md | 9 ++++++--- .../tutorials/simple-todo-list/3-the-todo-model.md | 10 +++++++--- .../tutorials/simple-todo-list/3-the-todo-model.md | 9 ++++++--- .../tutorials/simple-todo-list/3-the-todo-model.md | 9 ++++++--- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/docs/tutorials/simple-todo-list/3-the-todo-model.md b/docs/docs/tutorials/simple-todo-list/3-the-todo-model.md index c5f5dfcddc..2742ba3b98 100644 --- a/docs/docs/tutorials/simple-todo-list/3-the-todo-model.md +++ b/docs/docs/tutorials/simple-todo-list/3-the-todo-model.md @@ -4,16 +4,19 @@ id: tuto-3-the-todo-model slug: 3-the-todo-model --- -Let’s create your first model. The CLI provides a useful command to generate a new file with an empty model. +The next step is to take care of the database. By default, every new project in FoalTS is configured to use an `SQLite` database as it does not require any additional installation. + +Let’s start by creating your first model. The CLI provides a useful command to generate a new file with an empty model. ```sh foal generate entity todo ``` -> FoalTS uses [TypeORM](http://typeorm.io), a complete *Object-Relational Mapper*, to communicate with the database(s). In TypeORM, simple models are called *entities* and are classes decorated with the `Entity` decorator. +:::info +FoalTS uses [TypeORM](http://typeorm.io) as the default ORM in any new application. This way, you don't have to configure anything and you can start a project quickly. However, if you wish, you still can choose to [use another one](../../databases/using-another-orm.md) ([Prisma](https://www.prisma.io/), [MikroORM](https://mikro-orm.io/), [Mongoose](https://mongoosejs.com/), etc), as the framework code is ORM independent. -> Every new project in FoalTS uses an `SQLite` database as it does not require any additional installation. But TypeORM supports many other databases. We will keep this one in this tutorial for simplicity. +::: Open the file `todo.entity.ts` in the `src/app/entities` directory and add a `text` column. diff --git a/docs/i18n/es/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md b/docs/i18n/es/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md index e63ee7b502..afb3bfbad4 100644 --- a/docs/i18n/es/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md +++ b/docs/i18n/es/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md @@ -4,15 +4,19 @@ id: tuto-3-the-todo-model slug: 3-the-todo-model --- -Vamos a crear su primer modelo. El CLI proporciona un comando útil para generar un nuevo archivo con un modelo vacío. +El siguiente paso es ocuparse de la base de datos. Por defecto, cada nuevo proyecto en FoalTS está configurado para utilizar una base de datos `SQLite` ya que no requiere ninguna instalación adicional. + +Empecemos por crear su primer modelo. El CLI proporciona un comando útil para generar un nuevo archivo con un modelo vacío. ```sh foal generate entity todo ``` -> FoalTS utiliza [TypeORM](http://typeorm.io), un completo *Object-Relational Mapper*, para comunicarse con la(s) base(s) de datos. En TypeORM, los modelos simples se llaman *entidades* y son clases decoradas con el decorador `Entity`. +:::info + +FoalTS utiliza [TypeORM](http://typeorm.io) como ORM por defecto en cualquier aplicación nueva. De esta manera, no tiene que configurar nada y puede empezar un proyecto rápidamente. Sin embargo, si lo desea, puede optar por [usar otro](../../databases/using-another-orm.md) ([Prisma](https://www.prisma.io/), [MikroORM](https://mikro-orm.io/), [Mongoose](https://mongoosejs.com/), etc), ya que el código del framework es independiente del ORM. -> Cada nuevo proyecto en FoalTS utiliza una base de datos `SQLite` ya que no requiere ninguna instalación adicional. Pero TypeORM soporta muchas otras bases de datos. Mantendremos esta en este tutorial por simplicidad. +::: Abra el archivo `todo.entity.ts` en el directorio `src/app/entities` y añada una columna `text`. diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md index 09968ba3d0..6d7a36c1aa 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md @@ -4,16 +4,19 @@ id: tuto-3-the-todo-model slug: 3-the-todo-model --- -Créons votre premier modèle. La CLI fournit une commande utile pour générer un nouveau fichier avec un modèle vide. +L'étape suivante consiste à s'occuper de la base de données. Par défaut, chaque nouveau projet dans FoalTS est configuré pour utiliser une base de données `SQLite` car elle ne nécessite aucune installation supplémentaire. + +Commençons par créer votre premier modèle. Le CLI fournit une commande utile pour générer un nouveau fichier avec un modèle vide. ```sh foal generate entity todo ``` -> FoalTS utilise [TypeORM](http://typeorm.io), un *Object-Relational Mapper* complet, pour communiquer avec la (les) base(s) de données. Dans TypeORM, les modèles simples sont appelés *entités* et sont des classes décorées avec le décorateur `Entity`. +:::info +FoalTS utilise [TypeORM](http://typeorm.io) comme ORM par défaut dans toute nouvelle application. De cette façon, vous n'avez rien à configurer et vous pouvez démarrer un projet rapidement. Toutefois, si vous le souhaitez, vous pouvez toujours choisir d'en [utiliser un autre](../../databases/using-another-orm.md) ([Prisma](https://www.prisma.io/), [MikroORM](https://mikro-orm.io/), [Mongoose](https://mongoosejs.com/), etc), le code du framework étant indépendant de l'ORM. -> Chaque nouveau projet dans FoalTS utilise une base de données `SQLite` car elle ne nécessite aucune installation supplémentaire. Mais TypeORM prend en charge de nombreuses autres bases de données. Nous garderons celle-ci dans ce tutoriel pour plus de simplicité. +::: Ouvrez le fichier `todo.entity.ts` dans le répertoire `src/app/entities` et ajoutez une colonne `text`. diff --git a/docs/i18n/id/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md b/docs/i18n/id/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md index c5f5dfcddc..2742ba3b98 100644 --- a/docs/i18n/id/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md +++ b/docs/i18n/id/docusaurus-plugin-content-docs/current/tutorials/simple-todo-list/3-the-todo-model.md @@ -4,16 +4,19 @@ id: tuto-3-the-todo-model slug: 3-the-todo-model --- -Let’s create your first model. The CLI provides a useful command to generate a new file with an empty model. +The next step is to take care of the database. By default, every new project in FoalTS is configured to use an `SQLite` database as it does not require any additional installation. + +Let’s start by creating your first model. The CLI provides a useful command to generate a new file with an empty model. ```sh foal generate entity todo ``` -> FoalTS uses [TypeORM](http://typeorm.io), a complete *Object-Relational Mapper*, to communicate with the database(s). In TypeORM, simple models are called *entities* and are classes decorated with the `Entity` decorator. +:::info +FoalTS uses [TypeORM](http://typeorm.io) as the default ORM in any new application. This way, you don't have to configure anything and you can start a project quickly. However, if you wish, you still can choose to [use another one](../../databases/using-another-orm.md) ([Prisma](https://www.prisma.io/), [MikroORM](https://mikro-orm.io/), [Mongoose](https://mongoosejs.com/), etc), as the framework code is ORM independent. -> Every new project in FoalTS uses an `SQLite` database as it does not require any additional installation. But TypeORM supports many other databases. We will keep this one in this tutorial for simplicity. +::: Open the file `todo.entity.ts` in the `src/app/entities` directory and add a `text` column.