-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Closed
Labels
Description
Issue type:
[x] question
[ ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql
/ mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
This was working for me earlier but now it is not. I am using a composite key of three different properties. Every time I try to update and existing row, I get the error QueryFailedError: duplicate key value violates unique constraint "PK_8b1375852f33d30b328388e5a5c"
.
This is my entity:
'use strict';
import * as _ from 'lodash';
import { Entity, Column, PrimaryColumn, Generated } from "typeorm";
@Entity()
export class Assortment {
@Column("uuid")
@Generated("uuid")
id!: string;
@PrimaryColumn()
accountId!: string;
@PrimaryColumn()
entityType!: string;
@PrimaryColumn()
parentId!: string;
@Column({
nullable: true
})
parentType!: string;
@Column('varchar', {
nullable: true
})
sortedIds!: string[];
@Column('jsonb', {
nullable: true
})
children!: Assortment[];
};
rbright, IRCraziestTaxi, aaron497, antl3x, franzos and 50 moreOLDIN, MartinSahlen, fuhua-zhang, mgreg89, rohitnick and 8 more