fix: assignment verwijderen gefixd

This commit is contained in:
Joyelle Ndagijimana 2025-04-22 08:55:50 +02:00
parent fac31b3f64
commit a963cf472c
2 changed files with 14 additions and 16 deletions

View file

@ -1,8 +1,8 @@
import { Collection, Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
import { Class } from '../classes/class.entity.js';
import { Group } from './group.entity.js';
import { Language } from '@dwengo-1/common/util/language';
import { AssignmentRepository } from '../../data/assignments/assignment-repository.js';
import {Cascade, Collection, Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property} from '@mikro-orm/core';
import {Class} from '../classes/class.entity.js';
import {Group} from './group.entity.js';
import {Language} from '@dwengo-1/common/util/language';
import {AssignmentRepository} from '../../data/assignments/assignment-repository.js';
@Entity({
repository: () => AssignmentRepository,
@ -34,6 +34,7 @@ export class Assignment {
@OneToMany({
entity: () => Group,
mappedBy: 'assignment',
cascade: [Cascade.ALL]
})
groups: Collection<Group> = new Collection<Group>(this);
}