This content originally appeared on DEV Community and was authored by Akash Chawan
getting below error
[Nest] 15320 - 18/06/2024, 9:48:15 pm ERROR [ExceptionHandler] Cannot add or update a child row: a foreign key constraint fails (shipping
.#sql-220c_403
, CONSTRAINT FK_ce723b9c7f1fbc4a9a1cf4d8865
FOREIGN KEY (present_rank
) REFERENCES rank
(id
) ON DELETE NO ACTION ON UPDATE NO ACTION)
QueryFailedError: Cannot add or update a child row: a foreign key constraint fails (shipping
.#sql-220c_403
, CONSTRAINT FK_ce723b9c7f1fbc4a9a1cf4d8865
FOREIGN KEY (present_rank
) REFERENCES rank
(id
) ON DELETE NO ACTION ON UPDATE NO ACTION)
@Column()
present_rank: string;
@OneToOne(() => Rank,rank=>rank.id)
@JoinColumn({ name: 'present_rank' })
rank: Rank;
This content originally appeared on DEV Community and was authored by Akash Chawan
Akash Chawan | Sciencx (2024-06-18T16:19:57+00:00) How to join tables data already exist in table. Retrieved from https://www.scien.cx/2024/06/18/how-to-join-tables-data-already-exist-in-table/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.