Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
haciendo que la columna generada sea opcional en NestJS/TypeORM

Tengo un escenario en el que tengo que hacer que la columna generated sea optional . en realidad tenemos que generar el campo si no está presente.

 @ApiProperty() @Generated('rowid') //this is generating value automatically @Column({name:"certificate_no",type: 'varchar'}) certificateNo?: string;

en realidad, en la interfaz de usuario tenemos una funcionalidad en la que tenemos que duplicate la fila. por lo tanto, cuando se llama a la API y el certificateNo no está presente, se debe generated este valor. si está presente, present value should be inserted into database .

Estoy poniendo en DTO .

 @ApiProperty() @IsOptional() @IsString() certificateNo?: string;

En realidad, genera un certificateNo No cada vez, incluso si está presente. ¿Hay alguna forma de manejar este escenario?

ingrese la descripción de la imagen aquí

si el usuario hace clic en el botón + , la misma fila debe duplicarse.

alguna sugerencia por favor

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!