postgres sql 数据库列值为 [null]

postgres sql database Column value is [null]

我正在使用 nestjs 和 typeorm 来查询

//this is my model(interface)
    export interface Product {
        id?:number,
        
        name?:string,
    }

这是我的entity.ts

@Entity('product')
export class ProductEntity{
    @PrimaryGeneratedColumn()
    id:number;

    @Column({ type:'text',nullable:true })
    name:string;

    @Column({type:'timestamp',default:() => 'CURRENT_TIMESTAMP'})
    createdAt:Date;

}

name 列值为 Null

这就是我所说的使用 postgress,

有人知道如何解决这个问题吗?

您正在向后端发送文本负载。它应该是 JSON 有效载荷。 使用下拉菜单 select JSON 问题就会消失。