Version: 2.0.0 (latest)
Create Models & Queries
You are reading the documentation for version 2 of FoalTS. Instructions for upgrading to this version are available here. The old documentation can be found here.
#
EntitiesSimple models are called entities in TypeORM. You can generate one with the above command.
Example:
The class Product
represents the database table and its instances represent the table rows.
In FoalTS, entity files should always be named with the extension
.entity.ts
. This way the CLI can find the entities when automatically generating migrations.