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.
26 lines (17 loc) • 440 B
text/typescript
import { Entity, IEntity, OneToOne, PrimaryKey, Property } from '../../lib';
import { Book2 } from './Book2';
()
export class Test2 {
()
id: number;
({ nullable: true })
name: string;
({ cascade: [], inversedBy: 'test' })
book: Book2;
static create(name: string) {
const t = new Test2();
t.name = name;
return t;
}
}
export interface Test2 extends IEntity<number> { }