Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: upsert should find unique index created by one-to-one relation (#…
…8618) * fix: upsert should find unique index created by one-to-one relation * fix: do not enforce column constraint exists for upsert * fix: remove OrmUtils reference and OrmUtils#flatten that is not needed * fix: leave the db engine to enforce upsert constraints as it sees fit
- Loading branch information
1 parent
f224f24
commit c8c00ba
Showing
3 changed files
with
43 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test/functional/repository/basic-methods/entity/OneToOneRelation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from "../../../../../src"; | ||
import { Category } from "./Category"; | ||
|
||
@Entity() | ||
export class OneToOneRelationEntity { | ||
@PrimaryGeneratedColumn() | ||
id: number; | ||
|
||
@OneToOne(() => Category) | ||
@JoinColumn() | ||
category: Category; | ||
|
||
@Column() | ||
order: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters