public function forward(){
return $this->hasMany(B::class, 'forward');
}
public function inverse(){
return $this->belongsToMany(C::class, 'inverse');
}
If i use A::find(some_id)->forwardRel()->where('some_prop', '>', 'value')->toSql() it returns.
MATCH (a:`A`), (a)-[`rel_forward_forward`:`forward`]->(b:`B`) WHERE id(a) = {ida} and b.some_prop > {some_prop} RETURN b"
Which is perfect. But when i do the inverse of this relationship with a where,
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have two models related like this:
Model A:
If i use
A::find(some_id)->forwardRel()->where('some_prop', '>', 'value')->toSql()
it returns.Which is perfect. But when i do the inverse of this relationship with a
where
,A::find(some_id)->inverse()->where('some_prop', '>', 'value')->toSql();
it returns
Isn't it supposed to be
inverse.some_prop
in the second statement? I am intending to do a where clause to get a filtered collection ofC
objects.