How to use the cormo.BelongsTo function in cormo

To help you get started, we’ve selected a few cormo examples, based on popular ways it is used in public projects.

github croquiscom / cormo / packages / graphql / src / decorators.ts View on Github external
export function BelongsTo(options: IBelongsToBasicOptions) {
  const c_options = {
    foreign_key: options.foreign_key,
    required: options.required,
    type: options.type,
  const c = cormo.BelongsTo(c_options);
  return (target: cormo.BaseModel, propertyKey: string) => {
    c(target, propertyKey);


ORM framework for Node.js

Latest version published 23 days ago

Package Health Score

70 / 100
Full package analysis