Open s6carlo opened 9 years ago
Update: the problem is connected with string values as primary key.
If I set
protected $primaryKey = 'product_code';
I can edit products that have a number as product_code but not the one with a different value, the error is Object of class SleepingOwl\Admin\Model\ModelConfiguration could not be converted to string
I have the same problem. Have you solved it?
No not solved,but actually I found a way to "avoid" it. I need a model with a string key only for "join actions" (multiselect). So I wrote a new model with a string primary key that I use only for multiselect, while to display data I have a second model from the same table with a numeric primary key. It is not the best solution, but it fits my case.
I have a table with id and product_code I want to use product_code as primary key, this is possibile:
The problem is if I try to edit or delete a table row, I get this error: Sorry, the page you are looking for could not be found. NotFoundHttpException in Application.php line 879:
The route http://localhost:8000/admin/mymodel/mytestcode/edit gives the error.
I think it come from the route
The route should use the model primary key and not the adminModelId