{"repo":"hodfords-solutions/typeorm-helper","free":true,"listed":false,"github":"https://github.com/hodfords-solutions/typeorm-helper","clone":"git clone https://github.com/hodfords-solutions/typeorm-helper.git","description":"Simplifies TypeORM usage in NestJS apps","language":"TypeScript","stars":47,"topics":["nestjs","nodejs","orm","typeorm"],"license":null,"category":"databases-storage","readme_excerpt":"nestjs-validation enhances validation in your NestJS projects by providing a customized ValidationPipe that returns custom error messages. This library simplifies error handling by offering localized and user-friendly responses Installation 🤖 Install the typeorm-helper package with: Usage 🚀 Defining custom repositories and entities When managing different entities, you can define custom repositories and entities. Below is an example for the Category entity and its corresponding repository. Entity The Category table in the database is modeled by the CategoryEntity , typeorm decorators should be used to define this entity. Repository The CategoryRepository is a custom repository that handles all database operations related to the CategoryEntity . By using the @CustomRepository decorator and extending BaseRepository , you ensure that your repository has both common CRUD functionality and can be easily customized with entity-specific methods. Lazy Relations Lazy relations allow you to load related entities only when they are needed. This can significantly improve performance by preventing the fetching of unnecessary data upfront. This functionality supports handling single entity, collection of entities, and paginated collection. Below is an example of how to load a list of posts associated with a specific category. Single entity Collection of entities Paginate collection You can also make use of the loadRelations function to efficiently load and retrieve related data Relation ","default_branch":null,"files":null,"tree":[],"storefront":"/r/hodfords-solutions","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hodfords-solutions/typeorm-helper/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}