This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
On my Product model, I have a few attributes in my $appends array.  I have defined accessors for these attributes in the Product model as well.   In my columns.yaml for the Product model, I have:
# ===================================
#  List Column Definitions
# ===================================
columns:
    name:
      label: Name
    num_skus:
      label: "# SKUs"
      sortable: false
      searchable: false
    qty_in_stock:
      label: Qty. In Stock
      sortable: false
      searchable: false
    num_sold:
      label: "# Sold"
      sortable: false
      searchable: false
    published:
      label: Published
      type: switchThis works fine, and displays the appended columns (num_skus, qty_in_stock, and num_sold).  But if I remove sortable: false, I get an SQL error:

It seems that October does its list sorting server-side using an SQL select statement with an order_by clause, so naturally this fails because there is no num_skus column.  IMO a client-side (ala datatables) sort would be better.  But has anyone else encountered this and come up with a work around?
Thanks.
Last updated
Yes I have had this problem but I could not find a solution so I had to disable those columns which is a little annoying!
1-3 of 3