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.
28 lines (19 loc) • 479 B
text/typescript
import { Entity, OneToOne, PrimaryKey, Property } from '../../lib';
import { BaseEntity22 } from './BaseEntity22';
import { FooBaz2 } from './FooBaz2';
()
export class FooBar2 extends BaseEntity22 {
()
id: number;
()
name: string;
({ inversedBy: 'bar' })
baz: FooBaz2;
({ owner: true })
fooBar: FooBar2;
static create(name: string) {
const bar = new FooBar2();
bar.name = name;
return bar;
}
}