diff --git a/backend/src/pokemon-actions/entities/pokemon-action.entity.ts b/backend/src/pokemon-actions/entities/pokemon-action.entity.ts index 9eb1009..db97074 100644 --- a/backend/src/pokemon-actions/entities/pokemon-action.entity.ts +++ b/backend/src/pokemon-actions/entities/pokemon-action.entity.ts @@ -17,7 +17,7 @@ export class PokemonAction { @PrimaryGeneratedColumn('uuid') id: string; - @ManyToOne(() => Pokemon, { eager: true }) + @ManyToOne(() => Pokemon, { eager: true, onDelete: 'CASCADE' }) @JoinColumn({ name: 'pokemon_id' }) pokemon: Pokemon;