heyo I've got a quick relationship like ```functio...
# box-products
d
heyo I've got a quick relationship like
Copy code
function relation(required guid key) {
   return hasMany(...).whereSomeKey(key);
}
i'm trying to eager load it, but wondering if I can pass the key argument? like
Copy code
instance.with("relation") // can't pass key here
instance.with({relation: (q) => q.whereSomeKeyAlreadyRanHere_Ithink()}) // ?
🧐 1
s
When I've run into this the only way around it I've found is to have the relationship without the argument and then add a
.whereSomeKey( key )
in the eager load constraint call