fix: Circulaire imports MikroORM

This commit is contained in:
Tibo De Peuter 2025-03-12 16:40:43 +01:00
parent 45b1b75cd6
commit 9e16458a59
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 5 additions and 5 deletions

View file

@ -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 { LearningPath } from './learning-path.entity.js';
import { LearningPathTransition } from './learning-path-transition.entity.js';
@ -6,7 +6,7 @@ import { LearningPathTransition } from './learning-path-transition.entity.js';
@Entity()
export class LearningPathNode {
@ManyToOne({ entity: () => LearningPath, primary: true })
learningPath!: LearningPath;
learningPath!: Rel<LearningPath>;
@PrimaryKey({ type: 'integer', autoincrement: true })
nodeNumber!: number;

View file

@ -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';
@Entity()
export class LearningPathTransition {
@ManyToOne({ entity: () => LearningPathNode, primary: true })
node!: LearningPathNode;
node!: Rel<LearningPathNode>;
@PrimaryKey({ type: 'numeric' })
transitionNumber!: number;
@ -13,5 +13,5 @@ export class LearningPathTransition {
condition!: string;
@ManyToOne({ entity: () => LearningPathNode })
next!: LearningPathNode;
next!: Rel<LearningPathNode>;
}