fix: cascade bij group entity
This commit is contained in:
		
							parent
							
								
									bb3a242bf9
								
							
						
					
					
						commit
						7823c45851
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| import { Collection, Entity, ManyToMany, ManyToOne, PrimaryKey } from '@mikro-orm/core'; | ||||
| import {Cascade, Collection, Entity, ManyToMany, ManyToOne, PrimaryKey} from '@mikro-orm/core'; | ||||
| import { Assignment } from './assignment.entity.js'; | ||||
| import { Student } from '../users/student.entity.js'; | ||||
| import { GroupRepository } from '../../data/assignments/group-repository.js'; | ||||
|  | @ -24,6 +24,7 @@ export class Group { | |||
|         entity: () => Student, | ||||
|         owner: true, | ||||
|         inversedBy: 'groups', | ||||
|         cascade: [Cascade.ALL], | ||||
|     }) | ||||
|     members: Collection<Student> = new Collection<Student>(this); | ||||
| } | ||||
|  |  | |||
		Reference in a new issue
	
	 Joyelle Ndagijimana
						Joyelle Ndagijimana