Retrieving the relation - JGdijk/ords GitHub Wiki

To retrieve a relation simply use the with() function and give the model name of the relation as argument.

taskRds.with('project').find(1)

It also accepts a callback function that accepts all where, orderBy and with functions.

taskRds.with('Project', (callback: JoinCallback) => callback
    .where('id', '>', 2)
    .orderBy('name', 'ASC')
    .with('user'))
.get()
.subscribe((x: Task[]) => console.log(x)