UNPKG

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.

23 lines (15 loc) 374 B
import { Entity, IEntity, OneToOne, PrimaryKey, Property } from '../../lib'; import { FooBar2 } from './FooBar2'; @Entity() export class FooBaz2 { @PrimaryKey() id: number; @Property() name: string; @OneToOne({ mappedBy: 'baz' }) bar: FooBar2; constructor(name: string) { this.name = name; } } export interface FooBaz2 extends IEntity<number> { }