quaerateum
Version:
Simple typescript ORM for node.js based on data-mapper, unit-of-work and identity-map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JS.
20 lines (14 loc) • 419 B
text/typescript
import { Collection, Entity, ManyToMany, Property, QueryOrder } from '../../lib';
import { Book2 } from './Book2';
import { BaseEntity2 } from './BaseEntity2';
()
export class BookTag2 extends BaseEntity2 {
({ length: 50 })
name: string;
({ entity: () => Book2, mappedBy: 'tags' })
books: Collection<Book2>;
constructor(name: string) {
super();
this.name = name;
}
}