Skip to main content
Module

x/cotton/mod.ts>BelongsTo

SQL Database Toolkit for Deno
Latest
function BelongsTo
import { BelongsTo } from "https://deno.land/x/cotton@v0.7.5/mod.ts";

Define a "belongs to" relational property.

Parameters

getModel: () => { new (): any; }

a callback function that returns the model associated with this relation.

column: string

the column name that being targetted in this relation.