Using Another ORM
The core of the framework is independent of TypeORM. So, if you do not want to use an ORM at all or use another ORM or ODM than TypeORM, you absolutely can.
To do so, you will have to remove TypeORM and all its utilities.
Uninstall TypeORM
-
First uninstall the dependencies.
npm uninstall typeorm @foal/typeorm
-
Then remove the directory
src/app/entities
and the filesrc/db.ts
. -
Remove or replace the script
create-user
insrc/app/scripts
. -
In the file
src/index.ts
, delete the connection creation calleddataSource.initialize()
. -
Finally, remove in
package.json
the scripts to manage migrations.
Examples
Limitations
When using another ORM than TypeORM some features are not available:
- the Groups & Permissions system,
- and the
foal g rest-api
command.