fix(backend): Probleem opgelost dat meerdere studenten en leerkrachten met dezelfde PK opgeslagen konden worden.
create() en insert() i.p.v. entity constructoren en persist() gebruikt.
This commit is contained in:
parent
295fe23e99
commit
bc94b25a6a
8 changed files with 18 additions and 36 deletions
|
@ -13,12 +13,4 @@ export class Student extends User {
|
|||
|
||||
@ManyToMany(() => Group)
|
||||
groups!: Collection<Group>;
|
||||
|
||||
constructor(
|
||||
public username: string,
|
||||
public firstName: string,
|
||||
public lastName: string
|
||||
) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,12 +7,4 @@ import { TeacherRepository } from '../../data/users/teacher-repository.js';
|
|||
export class Teacher extends User {
|
||||
@ManyToMany(() => Class)
|
||||
classes!: Collection<Class>;
|
||||
|
||||
constructor(
|
||||
public username: string,
|
||||
public firstName: string,
|
||||
public lastName: string
|
||||
) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue