Issue About Reorderable Table in Relation Manager

When i add reorderable to my table, it throws Integrity constraint violation: 1052 Column 'order_column' in order clause is ambiguous MySQL error . Because my pivot table and categories table has same order_column column.

After i got this error i tried ->reorderable(DB::raw('groupables.order_column')) and it's works for show but for update. This is not updates order_column.


My Database Structure:
I have groups, groupables, products and categories tables. Groupables table is morphic table. Schema is like Group --[ morphedByMany ]-> Groupable --[ morphTo ]-> (Category | Product) .

| Group
  • id
    -name
| Groupable
  • id
  • group_id
  • groupable_id
  • groupable_type
  • order_column
| Category
  • id
  • name
  • order_column
image.png
Was this page helpful?