The best way to get started is to clone our example project (opens new window) and start playing with it. Out the example project (opens new window). knex has a great migration tool (opens new window) that we recommend for this job. Objection.js leaves the schema related things
Powerful mechanisms for eager loading, inserting and upserting object graphs.
Nodejs orm update#
Simple and fun way to fetch, insert, update and delete objects using the full power of SQL.An easy declarative way of defining models and relationships between them.SQLite3, Postgres and MySQL are thoroughly tested (opens new window). All databases supported by knex are supported by objection.js. Objection.js is built on an SQL query builder called knex (opens new window). You get all the benefits of an SQL query builder but also a powerful set of tools for working with relations. Objection.js is an ORM (opens new window) for Node.js (opens new window) that aims to stay out of your way and make it as easy as possible to use the full power of SQL and the underlying database engine while still making the common stuff easy and enjoyable.Įven though ORM is the best commonly known acronym to describe objection, a more accurate description is to call it a relational query builder.