{"id":16211606,"url":"https://github.com/laurabeatris/typeorm-relations","last_synced_at":"2025-10-04T14:16:30.347Z","repository":{"id":39777265,"uuid":"289900658","full_name":"LauraBeatris/typeorm-relations","owner":"LauraBeatris","description":"practicing many to many relationships with typeorm, postgres and express","archived":false,"fork":false,"pushed_at":"2023-01-24T03:42:24.000Z","size":364,"stargazers_count":21,"open_issues_count":16,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T01:12:29.889Z","etag":null,"topics":["backend","express","jest","nodejs","postgres","rest","typeorm","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LauraBeatris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-24T10:45:01.000Z","updated_at":"2024-04-05T19:06:28.000Z","dependencies_parsed_at":"2023-02-13T16:01:48.080Z","dependency_job_id":null,"html_url":"https://github.com/LauraBeatris/typeorm-relations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"rocketseat-education/gostack-template-typeorm-relations","purl":"pkg:github/LauraBeatris/typeorm-relations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraBeatris%2Ftypeorm-relations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraBeatris%2Ftypeorm-relations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraBeatris%2Ftypeorm-relations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraBeatris%2Ftypeorm-relations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LauraBeatris","download_url":"https://codeload.github.com/LauraBeatris/typeorm-relations/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LauraBeatris%2Ftypeorm-relations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278322214,"owners_count":25967885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","express","jest","nodejs","postgres","rest","typeorm","typescript"],"created_at":"2024-10-10T10:48:43.033Z","updated_at":"2025-10-04T14:16:30.317Z","avatar_url":"https://github.com/LauraBeatris.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\n   \u003cimg src=\".github/logo.png\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n# TypeORM Relationships\n\n\u003e Learn how to perform relationships in TypeORM\n\n\u003e [![Run in Insomnia}](https://insomnia.rest/images/run.svg)](https://insomnia.rest/run/?label=Hotseat%20API\u0026uri=https%3A%2F%2Fraw.githubusercontent.com%2FLauraBeatris%2Ftypeorm-relations%2Fmaster%2F.github%2Ftypeorm_relations.json)\n\n[![Author](https://img.shields.io/badge/author-LauraBeatris-ED341F?style=flat-square)](https://github.com/LauraBeatris)\n[![Languages](https://img.shields.io/github/languages/count/LauraBeatris/typeorm-relations?color=%23ED341F\u0026style=flat-square)](#)\n[![Stars](https://img.shields.io/github/stars/LauraBeatris/typeorm-relations?color=ED341F\u0026style=flat-square)](https://github.com/LauraBeatris/typeorm-relations/stargazers)\n[![Forks](https://img.shields.io/github/forks/LauraBeatris/typeorm-relations?color=%23ED341F\u0026style=flat-square)](https://github.com/LauraBeatris/typeorm-relations/network/members)\n[![Contributors](https://img.shields.io/github/contributors/LauraBeatris/typeorm-relations?color=ED341F\u0026style=flat-square)](https://github.com/LauraBeatris/typeorm-relations/graphs/contributors)\n\n# :pushpin: Table of Contents\n\n* [Features](#rocket-features)\n* [Database Model](#clipboard-features)\n* [Learning Sources](#orange_book-learning-sources)\n* [Installation](#construction_worker-installation)\n* [Getting Started](#runner-getting-started)\n* [FAQ](#postbox-faq)\n* [Found a bug? Missing a specific feature?](#bug-issues)\n* [Contributing](#tada-contributing)\n* [License](#closed_book-license)\n\n# :rocket: Features\n\n* 🛍\u0026nbsp; Store orders, products and customers\n* 📔\u0026nbsp; Store students, classes and teachers\n\n# :clipboard: Database Model\n\nIn order to understand the relationships, I've created the following database models:\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\".github/student-classes-db-model.png\" width=\"900\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003cimg src=\".github/orders-db-model.png\" width=\"900\"/\u003e\n\u003c/p\u003e\n\n# :orange_book: Learning Sources\n\n- [Relations in TypeORM](https://orkhan.gitbook.io/typeorm/docs/relations)\n- [What are Many To Many Relations](https://typeorm.io/#/many-to-many-relations/what-are-many-to-many-relations)\n- [Many to Many Entities in TypeORM](https://www.youtube.com/watch?v=RH_es0awU_A)\n- [Saving Many to Many Relations with only one save call](https://typeorm.io/#/relations/cascades)\n\n# :construction_worker: Installation\n\n**You need to install [Node.js](https://nodejs.org/en/download/) and [Yarn](https://yarnpkg.com/) first, then in order to clone the project via HTTPS, run this command:**\n\n```\ngit clone https://github.com/LauraBeatris/typeorm-relations.git\n```\n\nSSH URLs provide access to a Git repository via SSH, a secure protocol. If you use a SSH key registered in your Github account, clone the project using this command:\n\n```\ngit clone git@github.com:LauraBeatris/typeorm-relations.git\n```\n\n**Install dependencies**\n\n```\nyarn install\n```\n\nOr\n\n```\nnpm install\n```\n\nCreate your enviroment variables based on the examples of ```.env.example```\n\n```\ncp .env.example .env\n```\n\nAfter copying the examples, make sure to fill the variables with new values.\n\n**Setup a database**\n\nInstall [Postgres](https://www.postgresql.org/) to create a database or if you have [Docker](https://www.docker.com/) in your machine, fill the environment values related to database configurations and then run the following commands in order to create a Postgres container.\n\n```docker-compose up```\n\n# :runner: Getting Started\n\nRun the transactions in order to configure the database schema\n\n```yarn typeorm migration:run```\n\nRun the following command in order to start the application in a development environment:\n\n```yarn dev:server```\n\n# :postbox: Faq\n\n**Question:** What are the tecnologies used in this project?\n\n**Answer:** The tecnologies used in this project are [NodeJS](https://nodejs.org/en/) + [Express Framework](http://expressjs.com/en/) to handle the server and [TypeORM](https://typeorm.io/#/)\n\n# :bug: Issues\n\nFeel free to **file a new issue** with a respective title and description on the the [TypeORM Relations](https://github.com/LauraBeatris/typeorm-relations/issues) repository. If you already found a solution to your problem, **I would love to review your pull request**! Have a look at our [contribution guidelines](https://github.com/LauraBeatris/typeorm-relations/blob/master/CONTRIBUTING.md) to find out about the coding standards.\n\n# :tada: Contributing\n\nCheck out the [contributing](https://github.com/LauraBeatris/typeorm-relations/blob/master/CONTRIBUTING.md) page to see the best places to file issues, start discussions and begin contributing.\n\n# :closed_book: License\n\nReleased in 2020.\nThis project is under the [MIT license](https://github.com/LauraBeatris/typeorm-relations/master/LICENSE).\n\nMade with love by [Laura Beatris](https://github.com/LauraBeatris) 💜🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurabeatris%2Ftypeorm-relations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurabeatris%2Ftypeorm-relations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurabeatris%2Ftypeorm-relations/lists"}