fix: Circulaire imports MikroORM
This commit is contained in:
		
							parent
							
								
									45b1b75cd6
								
							
						
					
					
						commit
						9e16458a59
					
				
					 2 changed files with 5 additions and 5 deletions
				
			
		|  | @ -1,4 +1,4 @@ | ||||||
| import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'; | import { Entity, Enum, ManyToOne, OneToMany, PrimaryKey, Property, Rel } from '@mikro-orm/core'; | ||||||
| import { Language } from './language.js'; | import { Language } from './language.js'; | ||||||
| import { LearningPath } from './learning-path.entity.js'; | import { LearningPath } from './learning-path.entity.js'; | ||||||
| import { LearningPathTransition } from './learning-path-transition.entity.js'; | import { LearningPathTransition } from './learning-path-transition.entity.js'; | ||||||
|  | @ -6,7 +6,7 @@ import { LearningPathTransition } from './learning-path-transition.entity.js'; | ||||||
| @Entity() | @Entity() | ||||||
| export class LearningPathNode { | export class LearningPathNode { | ||||||
|     @ManyToOne({ entity: () => LearningPath, primary: true }) |     @ManyToOne({ entity: () => LearningPath, primary: true }) | ||||||
|     learningPath!: LearningPath; |     learningPath!: Rel<LearningPath>; | ||||||
| 
 | 
 | ||||||
|     @PrimaryKey({ type: 'integer', autoincrement: true }) |     @PrimaryKey({ type: 'integer', autoincrement: true }) | ||||||
|     nodeNumber!: number; |     nodeNumber!: number; | ||||||
|  |  | ||||||
|  | @ -1,10 +1,10 @@ | ||||||
| import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'; | import { Entity, ManyToOne, PrimaryKey, Property, Rel } from '@mikro-orm/core'; | ||||||
| import { LearningPathNode } from './learning-path-node.entity.js'; | import { LearningPathNode } from './learning-path-node.entity.js'; | ||||||
| 
 | 
 | ||||||
| @Entity() | @Entity() | ||||||
| export class LearningPathTransition { | export class LearningPathTransition { | ||||||
|     @ManyToOne({ entity: () => LearningPathNode, primary: true }) |     @ManyToOne({ entity: () => LearningPathNode, primary: true }) | ||||||
|     node!: LearningPathNode; |     node!: Rel<LearningPathNode>; | ||||||
| 
 | 
 | ||||||
|     @PrimaryKey({ type: 'numeric' }) |     @PrimaryKey({ type: 'numeric' }) | ||||||
|     transitionNumber!: number; |     transitionNumber!: number; | ||||||
|  | @ -13,5 +13,5 @@ export class LearningPathTransition { | ||||||
|     condition!: string; |     condition!: string; | ||||||
| 
 | 
 | ||||||
|     @ManyToOne({ entity: () => LearningPathNode }) |     @ManyToOne({ entity: () => LearningPathNode }) | ||||||
|     next!: LearningPathNode; |     next!: Rel<LearningPathNode>; | ||||||
| } | } | ||||||
|  |  | ||||||
		Reference in a new issue