Closed kapouer closed 9 years ago
Is this an inherent limitation of the hasOne / hasMany semantics ?
Wouldn't it be simpler and less restrictive to be able to use a Model has a field of another Model, like so:
hasOne Job:
var Employee = db.define("employee", { name : { type: "text", size: 50 }, job : Job });
hasMany Employee, Job, ...
var Task = db.define("task", { employee: Employee, job : Job, client: Client });
I also imagine that could be implemented somehow using custom types.
oh yeah, i'm that stupid
Is this an inherent limitation of the hasOne / hasMany semantics ?
Wouldn't it be simpler and less restrictive to be able to use a Model has a field of another Model, like so:
hasOne Job:
hasMany Employee, Job, ...
I also imagine that could be implemented somehow using custom types.