Skip to content

Commit

Permalink
Merge pull request #27 from Enigmatis/empty-context-bug-fix
Browse files Browse the repository at this point in the history
Empty context bug fix
  • Loading branch information
chenshoo authored Jan 6, 2020
2 parents 3545f63 + 3b69473 commit dbe6b1a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions test/dal/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ import { Book } from './book';
export class Library {
@Column({ nullable: true })
public name: string;

@ManyToOne(
() => Author,
author => author.libraries,
{ onDelete: 'CASCADE' },
)
public author: Author;

@OneToMany(
() => Book,
books => books.library,
)
public books: Book[];
@PrimaryGeneratedColumn('uuid')
private id: string;
@Column({
Expand Down Expand Up @@ -42,19 +55,6 @@ export class Library {
default: false,
})
private deleted: boolean = false;

@ManyToOne(
() => Author,
author => author.libraries,
{ onDelete: 'CASCADE' },
)
public author: Author;

@OneToMany(
() => Book,
books => books.library,
)
public books: Book[];
constructor(name?: string, books?: Book[]) {
if (name) {
this.name = name;
Expand Down

0 comments on commit dbe6b1a

Please sign in to comment.