-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi,
I found an issue where the relation is not resolved when doing an expand. I have the following case in my Car
class
#[LodataFunction(name: 'Engine')]
public function engine()
{
return $this->hasOne(Engine::class)
->where('brand', '=', $this->brand);
}
In this case, there is no Engine returned even though the SQL is correct and does give me a result when queried. I believe that the issue here is that the 'Engine' function is called before the parameters are set on the parent model, thus resulting in an empty result and caching that result.
Metadata
Metadata
Assignees
Labels
No labels