3 ms·
TypeORM is very much a traditional ORM. You define your model classes, and the relationships between them, in code, and TypeORM takes charge of creating and mod
by gmac 6y ago
TypeORM is very much a traditional ORM. You define your model classes, and the relationships between them, in code, and TypeORM takes charge of creating and modifying your tables. Then you use the model classes to query the database, without really knowing what SQL is going to be issued. TypeORM is complicated: there are lots of new abstractions to learn, and you’re a long way from the raw SQL.
Zapatos aims at a very much reduced level of abstraction: it’s really just a much more ergonomic, and fully typed, way to run SQL. I created it mainly out of frustration with TypeORM, after converting an existing code base from CoffeeScript to TypeScript and from Sequelize to TypeORM.
My recollection is that TypeORM did something really dumb and unexpected, like deciding to catch a unique index violation and silently replace the offending record, and that this was what finally prompted me to decide to replace it with something homegrown. I also found using transactions with TypeORM clumsy and painful.