Oh, I guess I’ll have to do it that way then, thanks! Is this something Ottoman.js is planning to support in the future?’
I have the following model:
var type1= ottoman.model("Type1", {
created : { type: "Date", default: Date.now() },
user : { ref : "User" },
connections: [{
type2: { ref : "Type2" },
type3: [{ ref: "Type3" }],
count : "integer"
}]
}
Basically I am trying to do a search by keyword. I have to check whether the keyword searched for is in the name of a Type3 document contained in the array, or is of a certain Type2, but since references only have the type and id, I have to perform some join operations to get the name before checking.
Thanks again!