NestJS - Database with PrismaWhich Prisma schema field type is used to define a relation to another model?AStringBRelation field with model typeCIntDBooleanCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify relation field typeIn Prisma, relations are defined by fields typed as another model, not primitive types like String or Int.Step 2: Relation field usageThese fields link models together and Prisma uses them to generate foreign keys and queries.Final Answer:Relation field with model type -> Option BQuick Check:Relation fields use model types, not primitives [OK]Quick Trick: Relation fields use model types, not primitives [OK]Common Mistakes:Using primitive types for relationsConfusing relation fields with scalar fieldsForgetting to specify the related model type
Master "Database with Prisma" in NestJS9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More NestJS Quizzes Database with Prisma - Prisma migrations - Quiz 1easy Database with Prisma - CRUD with Prisma - Quiz 8hard Database with TypeORM - Relations (OneToMany, ManyToOne, ManyToMany) - Quiz 1easy Guards - JWT authentication guard - Quiz 14medium Guards - Guard interface (canActivate) - Quiz 11easy Guards - Role-based guards - Quiz 15hard Interceptors - Why interceptors add cross-cutting logic - Quiz 9hard Middleware - Applying middleware to routes - Quiz 8hard Pipes - Built-in pipes (ParseIntPipe, ParseBoolPipe) - Quiz 4medium Pipes - ValidationPipe in depth - Quiz 9hard