Vaadin Table Sorting Non-Primitive Column

I have a fairly complex table that contains simple columns such as Date, String, Integer, etc. Sorting these columns works fine by default. But I also have other columns of more complex data structures. Sorting these columns doesn’t seem to work even though my objects all implement the Comparable Interface. I’ve looked into using the

setSortProperty(propertyID, sortProperty)

method but I’m not sure how to use it and I cant find any documentation anywhere. I am using a JPA Container so I cant use the solution found here:
https://vaadin.com/forum/#!/thread/286681/286792
, but I’d like to have the columns sortable by their toString methods. Please help!

I think you have what’s called a nested container. Are you adding the nested properties to your container? If not, see this post:

https://vaadin.com/forum#!/thread/7864978/7869286

In case someone stumbles upon this: JPAContainer does sorting in the database, so it is not possible to use Java Comparable/toString()/… in sorting. Any customization possible only extends to what sorting can be done with JPA in the database.