© 2023 Hashnode
#typeorm
Introduction Single Table Inheritance is a design pattern that allows you to represent a hierarchy of objects using a single database table. Each subclass in the hierarchy is represented as a row in t…
Sometimes while making our models (table) we declare some columns which are only to be used for tracking the entry and updation of the data like the created_at and updated_at columns. We often declare…
TypeORM is an Object Relational Mapping (ORM) framework for TypeScript and JavaScript, which allows developers to manage and interact with relational databases using object-oriented programming concepts. TypeORM provides an easy-to-use API …
So, I was playing around with TypeORM and at some point, I needed to populate my database with some data to be able to test some features as they could be in real-world situations. Thankfully, we got …
Custom repositories extend the base repository class and enrich it with several additional methods. This post covers unit and integration testing. // user.repository.ts @Injectable() export class UserRepository extends Repository<UserEntity…
In continuation of our previous topic on "Introduction to TypeORM and its Features", you can read about it here. We will be having an insight into some of those features mentioned. Just as a reminder of what TypeORM is, we defined it to be …
This post covers TypeORM examples with the NestJS framework, from setting up the connection with the Postgres database to working with transactions. The following snippets can be adjusted and reused with other frameworks like Express. The s…
What is TypeORM? Understanding how relationships work in database management is an important concept for a software engineer to understand. We will learn what typeORM is, how relationships work in typ…
NestJS with TypORM NestJS is a popular framework for building scalable and efficient server-side applications using Node.js. It provides a modular structure for organizing your code and makes it easy …
Hi there, in this article I'll be showing you how to spin up a simple boilerplate using Javascript, Express, and TypeORM. This article assumes that you already know Javascript and have Postgresql ins…