fix: foreignKey violation bij delete assignment gefixd
This commit is contained in:
		
							parent
							
								
									7823c45851
								
							
						
					
					
						commit
						219616f4ee
					
				
					 3 changed files with 14 additions and 10 deletions
				
			
		|  | @ -1,6 +1,6 @@ | |||
| import { Student } from '../users/student.entity.js'; | ||||
| import { Group } from './group.entity.js'; | ||||
| import { Entity, Enum, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'; | ||||
| import { Entity, Enum, ManyToOne, PrimaryKey, Property, Cascade } from '@mikro-orm/core'; | ||||
| import { SubmissionRepository } from '../../data/assignments/submission-repository.js'; | ||||
| import { Language } from '@dwengo-1/common/util/language'; | ||||
| 
 | ||||
|  | @ -21,8 +21,8 @@ export class Submission { | |||
|     @PrimaryKey({ type: 'numeric', autoincrement: false }) | ||||
|     learningObjectVersion = 1; | ||||
| 
 | ||||
|     @ManyToOne({ | ||||
|         entity: () => Group, | ||||
|     @ManyToOne(() => Group, { | ||||
|         cascade: [Cascade.REMOVE], | ||||
|     }) | ||||
|     onBehalfOf!: Group; | ||||
| 
 | ||||
|  |  | |||
		Reference in a new issue
	
	 Joyelle Ndagijimana
						Joyelle Ndagijimana