MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / constructor

Method constructor

tests/entities-sql/Book2.ts:72–83  ·  view source on GitHub ↗
(title: string, author: number | Author2, price?: number, isbn?: string, publisher?: number | Publisher2)

Source from the content-addressed store, hash-verified

70 tagsUnordered = new Collection<BookTag2>(this);
71
72 constructor(title: string, author: number | Author2, price?: number, isbn?: string, publisher?: number | Publisher2) {
73 this.title = title;
74 this.author = rel(Author2, author);
75 this.publisher = ref(Publisher2, publisher);
76
77 if (price) {
78 this.price = price;
79 }
80 if (isbn) {
81 this.isbn = isbn;
82 }
83 }
84}
85
86export interface Book2Meta {

Callers

nothing calls this directly

Calls 2

relFunction · 0.90
refFunction · 0.90

Tested by

no test coverage detected