Not Working with uuid
Closed this issue · 2 comments
talenta-eg commented
Firstly , Thanks for this Awesome Package
in fact i am using uuid in routing outside my app and id in relationships as the following example
use \Askedio\SoftCascade\Traits\SoftCascadeTrait;
protected $softCascade = ['orders'];
protected $primaryKey = 'id';
public function getKeyName()
{
return 'uuid';
}
/**
* Get all of the user's orders.
* @return \Illuminate\Database\Eloquent\Relations\MorphMany
*/
public function orders()
{
return $this->morphMany(Order::class, 'orderable', 'owner_type', 'owner_id', 'id');
}`
When i try to delete within softCascade nothing happen with relation
Note: this's not only morphMany but with all laravel relations
Any Suggest,Thanks
maguilar92 commented
@MuhammadAtallah Thats because our package use getKeyName function to get the columns that we use for search relationships.
andrekutianski commented
It is impossible to use this package if I set UUID as foreign key?