codejump

TypeORM Basics

Preview — 3 of 10 questions

Which method do you call to configure the global TypeORM connection at the root module of a NestJS application?

ATypeOrmModule.forFeature()
BDatabaseModule.register()
CTypeOrmModule.connect()
DTypeOrmModule.forRoot()

Which decorator turns a plain TypeScript class into a TypeORM database table mapping?

A@Entity()
B@Model()
C@Table()
D@Schema()

What does @PrimaryGeneratedColumn() do on an entity property?

AMarks the column as a foreign key
BCreates a plain column that must always be set manually
CCreates a column whose value is auto-generated by the database (e.g. auto-increment integer)
DCreates a UUID only

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.