相关疑难解决方法(0)

将字符串数组存储在 typeorm postgres 数据库中

我想在 Postgres 数据库中存储一个字符串数组,我有以下代码,但它没有按我想要的方式工作:

  @Column({type: 'text', array: true, nullable: true })
  names: string[] = [];
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

PostgreSQL said: malformed array literal: "["james"]"
Detail: "[" must introduce explicitly-specified array dimensions.
Run Code Online (Sandbox Code Playgroud)

我可能做错了什么吗?

sql postgresql typeorm

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

postgresql ×1

sql ×1

typeorm ×1