I have two classes that I want to define relationships for. I am trying to use static variables to achieve this however the references to the classes are not defined.
import BaseQuery from "../../src/BaseQuery";
import Checklist from "./Checklist";
export default class Task extends BaseQuery {
static belongsTo = [Checklist];
}
import BaseQuery from "../../src/BaseQuery";
import Task from "./Task";
export default class Checklist extends BaseQuery {
static hasMany = [Task];
}
In the Task class, checklist is undefined and in the Checklist class Task is defined but not as I would expect it. Is there anyway to get this to work?