Open threesquared opened 9 years ago
This is a tricky one. We actually do use it on polymorphic relations but in our case we would have the searchabletrait on the details class. The path would start looping since the quoterequest would be pointing to itself every time. Not sure what the solution would be here...I'll take some time to think about it and see if I can come up with something.
I dont want to bother, but I would like to know how to implement indexing for Polymorphic Relationships. I have the following Models:
class Event extends Model{
use SearchableTrait,
public function eventable()
{
return $this->morphTo();
}
}
Then I have :
class Venue extends Model{
use TransformableTrait, CallableTrait;
public function events()
{
return $this->morphMany('BeNight\Models\Event', 'eventable');
}
}
class Promoter extends Model{
use TransformableTrait, CallableTrait;
public function events()
{
return $this->morphMany('BeNight\Models\Event', 'eventable');
}
}
How can I index the event model referencing Venue and Promoters? I have the same problem of @threesquared. Thanks for your time @iverberk
Is there support for polymorphic relationships? I see there is a check in PathsCommand for polymorphic relationships. However when I run the command on my model it doesn't get past line 159 as the related model is an instance of the ancestor.
I have
and
but the path command only returns